Mercurial > hg > CbC > CbC_llvm
diff clang/test/CodeGen/xcore-abi.cpp @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | 2e18cbf3894f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clang/test/CodeGen/xcore-abi.cpp Thu Feb 13 15:10:13 2020 +0900 @@ -0,0 +1,26 @@ +// REQUIRES: xcore-registered-target + +// RUN: %clang_cc1 -triple xcore-unknown-unknown -fno-signed-char -fno-common -emit-llvm -o - -x c++ %s | FileCheck %s + +// CHECK: target triple = "xcore-unknown-unknown" + + +// C++ constants are not placed into the ".cp.rodata" section. +// CHECK: @cgx = external constant i32 +extern const int cgx; +int fcgx() { return cgx;} +// CHECK: @g1 = global i32 0, align 4 +int g1; +// CHECK: @cg1 = constant i32 0, align 4 +extern const int cg1 = 0; + +// Regression test for a bug in lib/CodeGen/CodeGenModule.cpp which called +// getLanguageLinkage() via a null 'VarDecl*'. This was an XCore specific +// conditional call to GV->setSection(".cp.rodata"). +class C { +public: + ~C(){}; +}; +C c; + +// CHECK: "frame-pointer"="none"