1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuc // CHECK: @_ZZ4FUNCvEN4SSSSC1ERKf 4f4a2713aSLionel Sambuc // CHECK: @_ZZ4FUNCvEN4SSSSC2E_0RKf 5f4a2713aSLionel Sambuc // CHECK: @_ZZ4GORFfEN4SSSSC1ERKf 6f4a2713aSLionel Sambuc // CHECK: @_ZZ4GORFfEN4SSSSC2E_0RKf 7f4a2713aSLionel Sambuc FUNC()8f4a2713aSLionel Sambucvoid FUNC () 9f4a2713aSLionel Sambuc { 10f4a2713aSLionel Sambuc { 11f4a2713aSLionel Sambuc float IVAR1 ; 12f4a2713aSLionel Sambuc 13f4a2713aSLionel Sambuc struct SSSS 14f4a2713aSLionel Sambuc { 15f4a2713aSLionel Sambuc float bv; 16f4a2713aSLionel Sambuc SSSS( const float& from): bv(from) { } 17f4a2713aSLionel Sambuc }; 18f4a2713aSLionel Sambuc 19f4a2713aSLionel Sambuc SSSS VAR1(IVAR1); 20f4a2713aSLionel Sambuc } 21f4a2713aSLionel Sambuc 22f4a2713aSLionel Sambuc { 23f4a2713aSLionel Sambuc float IVAR2 ; 24f4a2713aSLionel Sambuc 25f4a2713aSLionel Sambuc struct SSSS 26f4a2713aSLionel Sambuc { 27f4a2713aSLionel Sambuc SSSS( const float& from) {} 28f4a2713aSLionel Sambuc }; 29f4a2713aSLionel Sambuc 30f4a2713aSLionel Sambuc SSSS VAR2(IVAR2); 31f4a2713aSLionel Sambuc } 32f4a2713aSLionel Sambuc } 33f4a2713aSLionel Sambuc GORF(float IVAR1)34f4a2713aSLionel Sambucvoid GORF (float IVAR1) 35f4a2713aSLionel Sambuc { 36f4a2713aSLionel Sambuc { 37f4a2713aSLionel Sambuc struct SSSS 38f4a2713aSLionel Sambuc { 39f4a2713aSLionel Sambuc float bv; 40f4a2713aSLionel Sambuc SSSS( const float& from): bv(from) { } 41f4a2713aSLionel Sambuc }; 42f4a2713aSLionel Sambuc 43f4a2713aSLionel Sambuc SSSS VAR1(IVAR1); 44f4a2713aSLionel Sambuc } 45f4a2713aSLionel Sambuc 46f4a2713aSLionel Sambuc { 47f4a2713aSLionel Sambuc float IVAR2 ; 48f4a2713aSLionel Sambuc 49f4a2713aSLionel Sambuc struct SSSS 50f4a2713aSLionel Sambuc { 51f4a2713aSLionel Sambuc SSSS( const float& from) {} 52f4a2713aSLionel Sambuc }; 53f4a2713aSLionel Sambuc 54f4a2713aSLionel Sambuc SSSS VAR2(IVAR2); 55f4a2713aSLionel Sambuc } 56f4a2713aSLionel Sambuc } 57f4a2713aSLionel Sambuc 58f4a2713aSLionel Sambuc // CHECK: @_ZZ12OmittingCodefEN4SSSSC1E_0RKf OmittingCode(float x)59f4a2713aSLionel Sambucinline void OmittingCode(float x) { 60f4a2713aSLionel Sambuc if (0) { 61f4a2713aSLionel Sambuc struct SSSS { 62f4a2713aSLionel Sambuc float bv; 63f4a2713aSLionel Sambuc SSSS(const float& from): bv(from) { } 64f4a2713aSLionel Sambuc }; 65f4a2713aSLionel Sambuc 66f4a2713aSLionel Sambuc SSSS VAR1(x); 67f4a2713aSLionel Sambuc } 68f4a2713aSLionel Sambuc 69f4a2713aSLionel Sambuc struct SSSS { 70f4a2713aSLionel Sambuc float bv; 71f4a2713aSLionel Sambuc SSSS(const float& from): bv(from) { } 72f4a2713aSLionel Sambuc }; 73f4a2713aSLionel Sambuc 74f4a2713aSLionel Sambuc SSSS VAR2(x); 75f4a2713aSLionel Sambuc } CallOmittingCode()76f4a2713aSLionel Sambucvoid CallOmittingCode() { OmittingCode(1); } 77f4a2713aSLionel Sambuc 78f4a2713aSLionel Sambuc // CHECK: @_ZZ15LocalAnonStructvENUt0_1gEv LocalAnonStruct()79f4a2713aSLionel Sambucinline void LocalAnonStruct() { 80f4a2713aSLionel Sambuc if (0) { 81f4a2713aSLionel Sambuc struct { void f() {} } x; 82f4a2713aSLionel Sambuc x.f(); 83f4a2713aSLionel Sambuc } 84f4a2713aSLionel Sambuc struct { void g() {} } y; 85f4a2713aSLionel Sambuc y.g(); 86f4a2713aSLionel Sambuc } CallLocalAnonStruct()87f4a2713aSLionel Sambucvoid CallLocalAnonStruct() { LocalAnonStruct(); } 88