| 1 |
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir |
| 2 |
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s |
| 3 |
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll |
| 4 |
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s |
| 5 |
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll |
| 6 |
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s |
| 7 |
|
| 8 |
const int global_no_use = 12; |
| 9 |
// CIR: cir.global constant {{.*}}@global_no_use |
| 10 |
// LLVM: @global_no_use = constant |
| 11 |
// OGCG: @global_no_use = constant |
| 12 |
|
| 13 |
const float global_used = 1.2f; |
| 14 |
// CIR: cir.global constant {{.*}}@global_used |
| 15 |
// LLVM: @global_used = constant |
| 16 |
// OGCG: @global_used = constant |
| 17 |
|
| 18 |
float const * get_float_ptr() { |
| 19 |
return &global_used; |
| 20 |
} |