@@ -9,11 +9,11 @@ struct Empty {};
9
9
constexpr auto func () { return 25 ; }
10
10
11
11
struct Foo {
12
- static constexpr int cexpr_int = func();
12
+ static constexpr int cexpr_int_with_addr = func();
13
13
static constexpr int cexpr_int2 = func() + 1 ;
14
14
static constexpr float cexpr_float = 2.0 + 1.0 ;
15
15
static constexpr Enum cexpr_enum = Enum::VAL;
16
- static constexpr Empty cexpr_empty {};
16
+ static constexpr Empty cexpr_struct_with_addr {};
17
17
static inline Enum inline_enum = Enum::VAL;
18
18
19
19
template <typename T>
@@ -24,24 +24,24 @@ int main() {
24
24
Foo f;
25
25
26
26
// Force global variable definitions to be emitted.
27
- (void )&Foo::cexpr_int ;
28
- (void )&Foo::cexpr_empty ;
27
+ (void )&Foo::cexpr_int_with_addr ;
28
+ (void )&Foo::cexpr_struct_with_addr ;
29
29
30
- return Foo::cexpr_int + Foo::cexpr_float
30
+ return Foo::cexpr_int_with_addr + Foo::cexpr_float
31
31
+ (int )Foo::cexpr_enum + Foo::cexpr_template<short >;
32
32
}
33
33
34
- // CHECK: @{{.*}}cexpr_int {{.*}} =
34
+ // CHECK: @{{.*}}cexpr_int_with_addr {{.*}} =
35
35
// CHECK-SAME: !dbg ![[INT_GLOBAL:[0-9]+]]
36
36
37
- // CHECK: @{{.*}}cexpr_empty {{.*}} =
37
+ // CHECK: @{{.*}}cexpr_struct_with_addr {{.*}} =
38
38
// CHECK-SAME !dbg ![[EMPTY_GLOBAL:[0-9]+]]
39
39
40
40
// CHECK: !DIGlobalVariableExpression(var: ![[INT_VAR:[0-9]+]], expr: !DIExpression())
41
- // CHECK: ![[INT_VAR]] = distinct !DIGlobalVariable(name: "cexpr_int ", linkageName:
41
+ // CHECK: ![[INT_VAR]] = distinct !DIGlobalVariable(name: "cexpr_int_with_addr ", linkageName:
42
42
// CHECK-SAME: isLocal: false, isDefinition: true, declaration: ![[INT_DECL:[0-9]+]])
43
43
44
- // CHECK: ![[INT_DECL]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_int ",
44
+ // CHECK: ![[INT_DECL]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_int_with_addr ",
45
45
// CHECK-SAME: flags: DIFlagStaticMember
46
46
// CHECK-NOT: extraData:
47
47
@@ -57,7 +57,7 @@ int main() {
57
57
// CHECK-SAME: flags: DIFlagStaticMember
58
58
// CHECK-NOT: extraData:
59
59
60
- // CHECK: ![[EMPTY_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_empty ",
60
+ // CHECK: ![[EMPTY_DECL:[0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "cexpr_struct_with_addr ",
61
61
// CHECK-SAME: flags: DIFlagStaticMember
62
62
// CHECK-NOT: extraData:
63
63
@@ -70,7 +70,7 @@ int main() {
70
70
// CHECK-NOT: extraData:
71
71
72
72
// CHECK: !DIGlobalVariableExpression(var: ![[EMPTY_VAR:[0-9]+]], expr: !DIExpression())
73
- // CHECK: ![[EMPTY_VAR]] = distinct !DIGlobalVariable(name: "cexpr_empty ", linkageName:
73
+ // CHECK: ![[EMPTY_VAR]] = distinct !DIGlobalVariable(name: "cexpr_struct_with_addr ", linkageName:
74
74
// CHECK-SAME: isLocal: false, isDefinition: true, declaration: ![[EMPTY_DECL]])
75
75
76
76
// CHECK: !DIGlobalVariableExpression(var: ![[INT_VAR2:[0-9]+]], expr: !DIExpression(DW_OP_constu, 26, DW_OP_stack_value))
0 commit comments