aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/debug-info-typedef.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/debug-info-typedef.c')
-rw-r--r--test/CodeGen/debug-info-typedef.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/debug-info-typedef.c b/test/CodeGen/debug-info-typedef.c
new file mode 100644
index 000000000000..51ebcc4d8749
--- /dev/null
+++ b/test/CodeGen/debug-info-typedef.c
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -emit-llvm -g -I%p %s -o - | FileCheck %s
+// Test that the location of the typedef points to the header file.
+#line 1 "a.c"
+#line 2 "b.h"
+typedef int MyType;
+#line 2 "a.c"
+
+MyType a;
+
+// CHECK: metadata ![[HEADER:[0-9]+]], null, metadata !"MyType"{{.*}} ; [ DW_TAG_typedef ] [MyType] [line 2, size 0, align 0, offset 0] [from int]
+// CHECK: ![[HEADER]] = metadata !{metadata !"b.h",