diff options
Diffstat (limited to 'test/CodeGenCXX/mangle-local-class-names.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle-local-class-names.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle-local-class-names.cpp b/test/CodeGenCXX/mangle-local-class-names.cpp index 3321460..8b950fc 100644 --- a/test/CodeGenCXX/mangle-local-class-names.cpp +++ b/test/CodeGenCXX/mangle-local-class-names.cpp @@ -55,3 +55,33 @@ void GORF (float IVAR1) } } +// CHECK: @_ZZ12OmittingCodefEN4SSSSC1E_0RKf +inline void OmittingCode(float x) { + if (0) { + struct SSSS { + float bv; + SSSS(const float& from): bv(from) { } + }; + + SSSS VAR1(x); + } + + struct SSSS { + float bv; + SSSS(const float& from): bv(from) { } + }; + + SSSS VAR2(x); +} +void CallOmittingCode() { OmittingCode(1); } + +// CHECK: @_ZZ15LocalAnonStructvENUt0_1gEv +inline void LocalAnonStruct() { + if (0) { + struct { void f() {} } x; + x.f(); + } + struct { void g() {} } y; + y.g(); +} +void CallLocalAnonStruct() { LocalAnonStruct(); } |