aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/debug-info-enum.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/debug-info-enum.c')
-rw-r--r--test/CodeGen/debug-info-enum.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/debug-info-enum.c b/test/CodeGen/debug-info-enum.c
new file mode 100644
index 000000000000..acf3f524088b
--- /dev/null
+++ b/test/CodeGen/debug-info-enum.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+
+// CHECK: metadata [[TEST3_ENUMS:![0-9]*]], {{[^,]*}}, null, null, null} ; [ DW_TAG_enumeration_type ] [e]
+// CHECK: [[TEST3_ENUMS]] = metadata !{metadata [[TEST3_E:![0-9]*]]}
+// CHECK: [[TEST3_E]] = {{.*}}, metadata !"E", i64 -1} ; [ DW_TAG_enumerator ] [E :: -1]
+
+enum e;
+void func(enum e *p) {
+}
+enum e { E = -1 };