[RISCV] Add shrinkwrap test cases showing gaps in current impl
[llvm-project.git] / clang / test / CodeGenCXX / mangle-local-class-names.cpp
blob848e4604c4f203d5787b0a3e1ee2a3094d8de0aa
1 // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
3 // CHECK: @_ZZ4FUNCvEN4SSSSC1ERKf
4 // CHECK: @_ZZ4FUNCvEN4SSSSC2E_0RKf
5 // CHECK: @_ZZ4GORFfEN4SSSSC1ERKf
6 // CHECK: @_ZZ4GORFfEN4SSSSC2E_0RKf
8 void FUNC ()
11 float IVAR1 ;
13 struct SSSS
15 float bv;
16 SSSS( const float& from): bv(from) { }
19 SSSS VAR1(IVAR1);
23 float IVAR2 ;
25 struct SSSS
27 SSSS( const float& from) {}
30 SSSS VAR2(IVAR2);
34 void GORF (float IVAR1)
37 struct SSSS
39 float bv;
40 SSSS( const float& from): bv(from) { }
43 SSSS VAR1(IVAR1);
47 float IVAR2 ;
49 struct SSSS
51 SSSS( const float& from) {}
54 SSSS VAR2(IVAR2);
58 // CHECK: @_ZZ12OmittingCodefEN4SSSSC1E_0RKf
59 inline void OmittingCode(float x) {
60 if (0) {
61 struct SSSS {
62 float bv;
63 SSSS(const float& from): bv(from) { }
66 SSSS VAR1(x);
69 struct SSSS {
70 float bv;
71 SSSS(const float& from): bv(from) { }
74 SSSS VAR2(x);
76 void CallOmittingCode() { OmittingCode(1); }
78 // CHECK: @_ZZ15LocalAnonStructvENUt0_1gEv
79 inline void LocalAnonStruct() {
80 if (0) {
81 struct { void f() {} } x;
82 x.f();
84 struct { void g() {} } y;
85 y.g();
87 void CallLocalAnonStruct() { LocalAnonStruct(); }