| 1 |
// Smoke test for ClangIR-to-LLVM IR code generation |
| 2 |
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll |
| 3 |
// RUN: FileCheck %s --input-file %t-cir.ll |
| 4 |
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll |
| 5 |
// RUN: FileCheck %s -check-prefix=OGCG --input-file %t.ll |
| 6 |
|
| 7 |
int b = 2; |
| 8 |
|
| 9 |
// CHECK: @b = global i32 2, align 4 |
| 10 |
// OGCG: @b = global i32 2, align 4 |
| 11 |
|
| 12 |
int a; |
| 13 |
|
| 14 |
// CHECK: @a = global i32 0, align 4 |
| 15 |
// OGCG: @a = global i32 0, align 4 |