27 lines · cpp
1// REQUIRES: xcore-registered-target2 3// RUN: %clang_cc1 -triple xcore-unknown-unknown -fno-signed-char -fno-common -emit-llvm -o - -x c++ %s | FileCheck %s4 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 i3210extern const int cgx;11int fcgx() { return cgx;}12// CHECK: @g1 ={{.*}} global i32 0, align 413int g1;14// CHECK: @cg1 ={{.*}} constant i32 0, align 415extern const int cg1 = 0;16 17// Regression test for a bug in lib/CodeGen/CodeGenModule.cpp which called18// getLanguageLinkage() via a null 'VarDecl*'. This was an XCore specific19// conditional call to GV->setSection(".cp.rodata").20class C {21public:22 ~C(){};23};24C c;25 26// CHECK-NOT: frame-pointer27