diff options
author | Eric Christopher <echristo@apple.com> | 2012-03-27 18:35:57 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-03-27 18:35:57 +0000 |
commit | 130ba34428cc24245806205ede796abc09863675 (patch) | |
tree | 57a94354b39590b16aec0c16adf10b16170c9d0c /test/DebugInfo | |
parent | 7f316597cfaf3e8cacf2626559b1aab310f4cb98 (diff) | |
download | external_llvm-130ba34428cc24245806205ede796abc09863675.zip external_llvm-130ba34428cc24245806205ede796abc09863675.tar.gz external_llvm-130ba34428cc24245806205ede796abc09863675.tar.bz2 |
Add a test for the previous commit. Also, remove two tests that were
testing a) the wrong behavior or b) something that I'm already testing
in the new test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo')
-rw-r--r-- | test/DebugInfo/2010-04-25-CU-entry_pc.ll | 9 | ||||
-rw-r--r-- | test/DebugInfo/X86/low-pc-cu.ll | 31 |
2 files changed, 31 insertions, 9 deletions
diff --git a/test/DebugInfo/2010-04-25-CU-entry_pc.ll b/test/DebugInfo/2010-04-25-CU-entry_pc.ll deleted file mode 100644 index de099b6..0000000 --- a/test/DebugInfo/2010-04-25-CU-entry_pc.ll +++ /dev/null @@ -1,9 +0,0 @@ -; RUN: llc < %s | grep entry_pc | count 2 -@i = global i32 1 ; <i32*> [#uses=0] - -!llvm.dbg.gv = !{!0} - -!0 = metadata !{i32 524340, i32 0, metadata !1, metadata !"i", metadata !"i", metadata !"", metadata !1, i32 1, metadata !3, i1 false, i1 true, i32* @i} ; [ DW_TAG_variable ] -!1 = metadata !{i32 524329, metadata !"b.c", metadata !"/tmp", metadata !2} ; [ DW_TAG_file_type ] -!2 = metadata !{i32 524305, i32 0, i32 1, metadata !"b.c", metadata !"/tmp", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ] -!3 = metadata !{i32 524324, metadata !1, metadata !"int", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] diff --git a/test/DebugInfo/X86/low-pc-cu.ll b/test/DebugInfo/X86/low-pc-cu.ll new file mode 100644 index 0000000..f9d9b91 --- /dev/null +++ b/test/DebugInfo/X86/low-pc-cu.ll @@ -0,0 +1,31 @@ +; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj +; RUN: llvm-dwarfdump %t | FileCheck %s + +; Check that we use DW_AT_low_pc + +; CHECK: DW_TAG_compile_unit [1] +; CHECK: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) +; CHECK: DW_TAG_subprogram [2] + +define i32 @_Z1qv() nounwind uwtable readnone ssp { +entry: + ret i32 undef, !dbg !13 +} + +!llvm.dbg.cu = !{!0} + +!0 = metadata !{i32 786449, i32 0, i32 4, metadata !"foo.cpp", metadata !"/Users/echristo/tmp", metadata !"clang version 3.1 (trunk 153454) (llvm/trunk 153471)", i1 true, i1 false, metadata !"", i32 0, metadata !1, metadata !1, metadata !3, metadata !1} ; [ DW_TAG_compile_unit ] +!1 = metadata !{metadata !2} +!2 = metadata !{i32 0} +!3 = metadata !{metadata !4} +!4 = metadata !{metadata !5, metadata !12} +!5 = metadata !{i32 786478, i32 0, metadata !6, metadata !"q", metadata !"q", metadata !"_Z1qv", metadata !6, i32 5, metadata !7, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 false, i32 ()* @_Z1qv, null, null, metadata !10} ; [ DW_TAG_subprogram ] +!6 = metadata !{i32 786473, metadata !"foo.cpp", metadata !"/Users/echristo/tmp", null} ; [ DW_TAG_file_type ] +!7 = metadata !{i32 786453, i32 0, metadata !"", i32 0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !8, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] +!8 = metadata !{metadata !9} +!9 = metadata !{i32 786468, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] +!10 = metadata !{metadata !11} +!11 = metadata !{i32 786468} ; [ DW_TAG_base_type ] +!12 = metadata !{i32 786478, i32 0, metadata !6, metadata !"t", metadata !"t", metadata !"", metadata !6, i32 2, metadata !7, i1 true, i1 true, i32 0, i32 0, null, i32 256, i1 false, null, null, null, metadata !10} ; [ DW_TAG_subprogram ] +!13 = metadata !{i32 7, i32 1, metadata !14, null} +!14 = metadata !{i32 786443, metadata !5, i32 5, i32 1, metadata !6, i32 0} ; [ DW_TAG_lexical_block ] |