summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp3
-rw-r--r--llvm/test/DebugInfo/X86/dbg-asm.s6
2 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 5bc0e43f59d..95cfe24eaae 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -613,7 +613,8 @@ static void EmitGenDwarfAranges(MCStreamer *MCOS,
// The 4 byte offset to the compile unit in the .debug_info from the start
// of the .debug_info.
if (InfoSectionSymbol)
- MCOS->EmitSymbolValue(InfoSectionSymbol, 4);
+ MCOS->EmitSymbolValue(InfoSectionSymbol, 4,
+ asmInfo->needsDwarfSectionOffsetDirective());
else
MCOS->EmitIntValue(0, 4);
// The 1 byte size of an address.
diff --git a/llvm/test/DebugInfo/X86/dbg-asm.s b/llvm/test/DebugInfo/X86/dbg-asm.s
index de4e8e4a97b..f6e5233ba45 100644
--- a/llvm/test/DebugInfo/X86/dbg-asm.s
+++ b/llvm/test/DebugInfo/X86/dbg-asm.s
@@ -14,6 +14,9 @@ _a:
# CHECK-COFF: 0x6 IMAGE_REL_I386_SECREL .debug_abbrev
# CHECK-COFF: 0xC IMAGE_REL_I386_SECREL .debug_line
# CHECK-COFF: }
+# CHECK-COFF: Section {{.*}} .debug_aranges {
+# CHECK-COFF: 0x6 IMAGE_REL_I386_SECREL .debug_info
+# CHECK-COFF: }
# CHECK-COFF: ]
# CHECK-ELF: Relocations [
@@ -21,4 +24,7 @@ _a:
# CHECK-ELF: 0x6 R_386_32 .debug_abbrev
# CHECK-ELF: 0xC R_386_32 .debug_line
# CHECK-ELF: }
+# CHECK-ELF: Section {{.*}} .rel.debug_aranges {
+# CHECK-ELF: 0x6 R_386_32 .debug_info
+# CHECK-ELF: }
# CHECK-ELF: ]
OpenPOWER on IntegriCloud