summaryrefslogtreecommitdiff
path: root/test/DebugInfo
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-04-09 20:22:47 +0000
committerEric Christopher <echristo@gmail.com>2013-04-09 20:22:47 +0000
commitaf12ad7c9264cb5840ccff5055d0a112a91798a5 (patch)
tree07444d61d7a332c0cb387eff444dfbaac8c9f350 /test/DebugInfo
parent3eb6d7fcd024b67d548e4c3a075682d7cff1599e (diff)
downloadllvm-af12ad7c9264cb5840ccff5055d0a112a91798a5.tar.gz
llvm-af12ad7c9264cb5840ccff5055d0a112a91798a5.tar.bz2
llvm-af12ad7c9264cb5840ccff5055d0a112a91798a5.tar.xz
Update the version of dwarf we say we're emitting to at least 3.
Deals with a dwarf2 -> dwarf3 DW_FORM_ref_addr change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo')
-rw-r--r--test/DebugInfo/dwarf-version.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/DebugInfo/dwarf-version.ll b/test/DebugInfo/dwarf-version.ll
new file mode 100644
index 0000000000..4e00dee001
--- /dev/null
+++ b/test/DebugInfo/dwarf-version.ll
@@ -0,0 +1,17 @@
+; RUN: llc -filetype=obj -O0 < %s > %t
+; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
+
+; Test the version of debug info we say we're emitting.
+; CHECK: version = 0x0003
+
+@a = common global i32 0, align 4
+
+!llvm.dbg.cu = !{!0}
+
+!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.3 (trunk 179108) (llvm/trunk 179114)", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !3, metadata !""} ; [ DW_TAG_compile_unit ] [/usr/local/google/home/echristo/tmp/foo.c] [DW_LANG_C99]
+!1 = metadata !{metadata !"foo.c", metadata !"/usr/local/google/home/echristo/tmp"}
+!2 = metadata !{i32 0}
+!3 = metadata !{metadata !4}
+!4 = metadata !{i32 786484, i32 0, null, metadata !"a", metadata !"a", metadata !"", metadata !5, i32 1, metadata !6, i32 0, i32 1, i32* @a, null} ; [ DW_TAG_variable ] [a] [line 1] [def]
+!5 = metadata !{i32 786473, metadata !1} ; [ DW_TAG_file_type ] [/usr/local/google/home/echristo/tmp/foo.c]
+!6 = metadata !{i32 786468, null, null, metadata !"int", i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]