summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Modules/ExtDebugInfo.cpp4
-rw-r--r--clang/test/Modules/Inputs/DebugCXX.h4
-rw-r--r--clang/test/Modules/ModuleDebugInfo.cpp16
3 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/Modules/ExtDebugInfo.cpp b/clang/test/Modules/ExtDebugInfo.cpp
index b0bca88b89e..6c5bd559fc9 100644
--- a/clang/test/Modules/ExtDebugInfo.cpp
+++ b/clang/test/Modules/ExtDebugInfo.cpp
@@ -39,6 +39,10 @@ TypedefUnion tdu;
TypedefEnum tde;
TypedefStruct tds;
+void foo() {
+ GlobalStruct.i = GlobalUnion.i = GlobalEnum;
+}
+
// CHECK: ![[NS:.*]] = !DINamespace(name: "DebugCXX", scope: ![[MOD:[0-9]+]],
// CHECK: ![[MOD]] = !DIModule(scope: null, name: {{.*}}DebugCXX
diff --git a/clang/test/Modules/Inputs/DebugCXX.h b/clang/test/Modules/Inputs/DebugCXX.h
index 285e094171c..cd2b7a67498 100644
--- a/clang/test/Modules/Inputs/DebugCXX.h
+++ b/clang/test/Modules/Inputs/DebugCXX.h
@@ -62,3 +62,7 @@ struct PureForwardDecl;
typedef union { int i; } TypedefUnion;
typedef enum { e0 = 0 } TypedefEnum;
typedef struct { int i; } TypedefStruct;
+
+union { int i; } GlobalUnion;
+struct { int i; } GlobalStruct;
+enum { e5 = 5 } GlobalEnum;
diff --git a/clang/test/Modules/ModuleDebugInfo.cpp b/clang/test/Modules/ModuleDebugInfo.cpp
index c1248fd4d8e..1f574568b6f 100644
--- a/clang/test/Modules/ModuleDebugInfo.cpp
+++ b/clang/test/Modules/ModuleDebugInfo.cpp
@@ -30,8 +30,18 @@
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
// CHECK-SAME-NOT: name:
+
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
+// CHECK-SAME-NOT: name:
+
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
+// CHECK-SAME-NOT: name:
// CHECK-SAME: identifier: "_ZTS11TypedefEnum")
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
+// CHECK-SAME-NOT: name:
+// CHECK: !DIEnumerator(name: "e5", value: 5)
+
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Struct"
// CHECK-SAME: identifier: "_ZTSN8DebugCXX6StructE")
@@ -65,4 +75,10 @@
// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "B",
// no mangled name here yet.
+// CHECK: !DICompositeType(tag: DW_TAG_union_type,
+// CHECK-SAME-NOT: name:
+
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type,
+// CHECK-SAME-NOT: name:
+
// CHECK-NEG-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "PureForwardDecl"
OpenPOWER on IntegriCloud