brintos

brintos / llvm-project-archived public Read only

0
0
Text · 787 B · 588642c Raw
21 lines · c
1// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir2// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s3// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll4// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s5// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll6// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s7 8const int global_no_use = 12;9// CIR: cir.global constant {{.*}}@global_no_use10// LLVM: @global_no_use = constant11// OGCG: @global_no_use = constant12 13const float global_used = 1.2f;14// CIR: cir.global constant {{.*}}@global_used15// LLVM: @global_used = constant16// OGCG: @global_used = constant17 18float const * get_float_ptr() {19  return &global_used;20}21