1 | // REQUIRES: xcore-registered-target |
2 | |
3 | // RUN: %clang_cc1 -triple xcore-unknown-unknown -fno-signed-char -fno-common -emit-llvm -o - -x c++ %s | FileCheck %s |
4 | |
5 | // CHECK: target triple = "xcore-unknown-unknown" |
6 | |
7 | |
8 | // C++ constants are not placed into the ".cp.rodata" section. |
9 | // CHECK: @cgx = external constant i32 |
10 | extern const int cgx; |
11 | int fcgx() { return cgx;} |
12 | // CHECK: @g1 = global i32 0, align 4 |
13 | int g1; |
14 | // CHECK: @cg1 = constant i32 0, align 4 |
15 | extern const int cg1 = 0; |
16 | |
17 | // Regression test for a bug in lib/CodeGen/CodeGenModule.cpp which called |
18 | // getLanguageLinkage() via a null 'VarDecl*'. This was an XCore specific |
19 | // conditional call to GV->setSection(".cp.rodata"). |
20 | class C { |
21 | public: |
22 | ~C(){}; |
23 | }; |
24 | C c; |
25 | |
26 | // CHECK: "no-frame-pointer-elim"="false" |
27 | // CHECK-NOT: "no-frame-pointer-elim-non-leaf" |
28 | |