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