llvm-project/clang/test/CodeGen/xcore-abi.cpp
Matt Arsenault ce6ae0b2a2 clang: Don't emit "frame-pointer"="none"
This is the default behavior and cuts down on attribute spam.
Probably should also do something to consolidate the option spellings;
printing and parsing it is repeated in at least 3 different places.

In the OpenMP tests, I had to manually delete some metadata check
lines update_cc_test_checks was inserting that included the local
build revision.
2023-01-03 19:42:46 -05:00

27 lines
753 B
C++

// 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-NOT: frame-pointer