[llvm] r190002 - Remove hack ensuring that darwin didn't produce dwarf > 3 for modules
Eric Christopher
echristo at gmail.com
Wed Sep 4 15:21:24 PDT 2013
Author: echristo
Date: Wed Sep 4 17:21:24 2013
New Revision: 190002
URL: http://llvm.org/viewvc/llvm-project?rev=190002&view=rev
Log:
Remove hack ensuring that darwin didn't produce dwarf > 3 for modules
without a limiting factor.
Update all testcases accordingly.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/test/DebugInfo/X86/DW_TAG_friend.ll
llvm/trunk/test/DebugInfo/X86/block-capture.ll
llvm/trunk/test/DebugInfo/X86/empty-and-one-elem-array.ll
llvm/trunk/test/DebugInfo/X86/enum-class.ll
llvm/trunk/test/DebugInfo/X86/pr11300.ll
llvm/trunk/test/DebugInfo/X86/stringpool.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=190002&r1=190001&r2=190002&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Sep 4 17:21:24 2013
@@ -161,12 +161,8 @@ DIType DbgVariable::getType() const {
/// Return Dwarf Version by checking module flags.
static unsigned getDwarfVersionFromModule(const Module *M) {
Value *Val = M->getModuleFlag("Dwarf Version");
- // If we don't have a value in the module go ahead and use the default in
- // dwarf::DWARF_VERSION.
- // FIXME: Apple ld has a problem parsing compilation units that specify a
- // dwarf version of greater than 3.
if (!Val)
- return Triple(M->getTargetTriple()).isOSDarwin() ? 3 : dwarf::DWARF_VERSION;
+ return dwarf::DWARF_VERSION;
return cast<ConstantInt>(Val)->getZExtValue();
}
Modified: llvm/trunk/test/DebugInfo/X86/DW_TAG_friend.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/DW_TAG_friend.ll?rev=190002&r1=190001&r2=190002&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/DW_TAG_friend.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/DW_TAG_friend.ll Wed Sep 4 17:21:24 2013
@@ -3,10 +3,10 @@
; Check that the friend tag is there and is followed by a DW_AT_friend that has a reference back.
-; CHECK: 0x00000032: DW_TAG_class_type [4]
-; CHECK: 0x00000077: DW_TAG_class_type [4]
-; CHECK: 0x000000a0: DW_TAG_friend [9]
-; CHECK: DW_AT_friend [DW_FORM_ref4] (cu + 0x0032 => {0x00000032})
+; CHECK: [[BACK:0x[0-9a-f]*]]: DW_TAG_class_type [4]
+; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "A")
+; CHECK: DW_TAG_friend [9]
+; CHECK-NEXT: DW_AT_friend [DW_FORM_ref4] (cu + 0x0032 => {[[BACK]]})
%class.A = type { i32 }
Modified: llvm/trunk/test/DebugInfo/X86/block-capture.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/block-capture.ll?rev=190002&r1=190001&r2=190002&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/block-capture.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/block-capture.ll Wed Sep 4 17:21:24 2013
@@ -2,10 +2,10 @@
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
; Checks that we emit debug info for the block variable declare.
-; CHECK: 0x00000030: DW_TAG_subprogram [3]
-; CHECK: 0x0000005b: DW_TAG_variable [5]
-; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x000000e6] = "block")
-; CHECK: DW_AT_location [DW_FORM_data4] (0x00000023)
+; CHECK: DW_TAG_subprogram [3]
+; CHECK: DW_TAG_variable [5]
+; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "block")
+; CHECK: DW_AT_location [DW_FORM_data4] ({{.*}})
%struct.__block_descriptor = type { i64, i64 }
%struct.__block_literal_generic = type { i8*, i32, i32, i8*, %struct.__block_descriptor* }
Modified: llvm/trunk/test/DebugInfo/X86/empty-and-one-elem-array.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/empty-and-one-elem-array.ll?rev=190002&r1=190001&r2=190002&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/empty-and-one-elem-array.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/empty-and-one-elem-array.ll Wed Sep 4 17:21:24 2013
@@ -28,34 +28,36 @@ declare void @llvm.dbg.declare(metadata,
; An empty array should not have an AT_upper_bound attribute. But an array of 1
; should.
-; CHECK: 0x00000074: DW_TAG_base_type [5]
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000043] = "int")
+; CHECK: DW_TAG_base_type [5]
+; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "int")
; CHECK-NEXT: DW_AT_encoding [DW_FORM_data1] (0x05)
; CHECK-NEXT: DW_AT_byte_size [DW_FORM_data1] (0x04)
; int[1]:
-; CHECK: 0x00000082: DW_TAG_array_type [7] *
-; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0074 => {0x00000074})
-; CHECK: 0x00000087: DW_TAG_subrange_type [8]
-; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x007b => {0x0000007b})
+; CHECK: DW_TAG_array_type [7] *
+; CHECK-NEXT: DW_AT_type [DW_FORM_ref4]
+; CHECK: DW_TAG_subrange_type [8]
+; CHECK-NEXT: DW_AT_type [DW_FORM_ref4]
; CHECK-NEXT: DW_AT_upper_bound [DW_FORM_data1] (0x00)
; int foo::b[1]:
-; CHECK: 0x000000a5: DW_TAG_member [10]
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000050] = "b")
-; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0082 => {0x00000082})
+; CHECK: DW_TAG_member [10]
+; CHECK: DW_TAG_member [10]
+; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "b")
+; CHECK-NEXT: DW_AT_type [DW_FORM_ref4]
; int[0]:
-; CHECK: 0x000000b5: DW_TAG_array_type [7] *
-; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0074 => {0x00000074})
-; CHECK: 0x000000ba: DW_TAG_subrange_type [11]
-; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x007b => {0x0000007b})
+; CHECK: DW_TAG_array_type [7] *
+; CHECK-NEXT: DW_AT_type [DW_FORM_ref4]
+; CHECK: DW_TAG_subrange_type [11]
+; CHECK-NEXT: DW_AT_type [DW_FORM_ref4]
; CHECK-NOT: DW_AT_upper_bound
; int bar::b[0]:
-; CHECK: 0x000000d7: DW_TAG_member [10]
-; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000050] = "b")
-; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x00b5 => {0x000000b5})
+; CHECK: DW_TAG_member [10]
+; CHECK: DW_TAG_member [10]
+; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "b")
+; CHECK-NEXT: DW_AT_type [DW_FORM_ref4]
!llvm.dbg.cu = !{!0}
Modified: llvm/trunk/test/DebugInfo/X86/enum-class.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/enum-class.ll?rev=190002&r1=190001&r2=190002&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/enum-class.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/enum-class.ll Wed Sep 4 17:21:24 2013
@@ -29,12 +29,12 @@
!22 = metadata !{metadata !"foo.cpp", metadata !"/Users/echristo/tmp"}
; CHECK: DW_TAG_enumeration_type [3]
-; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x00000026})
+; CHECK: DW_AT_type [DW_FORM_ref4]
; CHECK: DW_AT_enum_class [DW_FORM_flag] (0x01)
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "A")
; CHECK: DW_TAG_enumeration_type [3] *
-; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0057 => {0x00000057})
+; CHECK: DW_AT_type [DW_FORM_ref4]
; CHECK: DW_AT_enum_class [DW_FORM_flag] (0x01)
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "B")
Modified: llvm/trunk/test/DebugInfo/X86/pr11300.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/pr11300.ll?rev=190002&r1=190001&r2=190002&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/pr11300.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/pr11300.ll Wed Sep 4 17:21:24 2013
@@ -3,8 +3,8 @@
; test that the DW_AT_specification is a back edge in the file.
-; CHECK: 0x0000005c: DW_TAG_subprogram [5]
-; CHECK: DW_AT_specification [DW_FORM_ref4] (cu + 0x005c => {0x0000005c})
+; CHECK: [[BACK:0x[0-9a-f]*]]: DW_TAG_subprogram [5]
+; CHECK: DW_AT_specification [DW_FORM_ref4] (cu + {{.*}} => {[[BACK]]})
%struct.foo = type { i8 }
Modified: llvm/trunk/test/DebugInfo/X86/stringpool.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/stringpool.ll?rev=190002&r1=190001&r2=190002&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/stringpool.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/stringpool.ll Wed Sep 4 17:21:24 2013
@@ -26,8 +26,8 @@
; Verify that we refer to 'yyyy' without a relocation.
; DARWIN: Lset5 = Linfo_string3-Linfo_string ## DW_AT_name
; DARWIN-NEXT: .long Lset5
-; DARWIN-NEXT: .long 39 ## DW_AT_type
-; DARWIN-NEXT: .byte 1 ## DW_AT_external
+; DARWIN-NEXT: .long 38 ## DW_AT_type
+; DARWIN-NEXT: ## DW_AT_external
; DARWIN-NEXT: .byte 1 ## DW_AT_decl_file
; DARWIN-NEXT: .byte 1 ## DW_AT_decl_line
; DARWIN-NEXT: .byte 9 ## DW_AT_location
More information about the llvm-commits
mailing list