[llvm] fccac1e - DebugInfo: Correct the form of DW_AT_macro_info in .dwo files (sec_offset, rather than data4)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 24 01:23:51 PST 2019
Author: David Blaikie
Date: 2019-12-24T01:23:21-08:00
New Revision: fccac1ec16951e9a9811abf19e2c18be147854fc
URL: https://github.com/llvm/llvm-project/commit/fccac1ec16951e9a9811abf19e2c18be147854fc
DIFF: https://github.com/llvm/llvm-project/commit/fccac1ec16951e9a9811abf19e2c18be147854fc.diff
LOG: DebugInfo: Correct the form of DW_AT_macro_info in .dwo files (sec_offset, rather than data4)
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/test/DebugInfo/X86/debug-macinfo-split-dwarf.ll
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 21c6636e94f3..fa6800de7955 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1195,7 +1195,7 @@ void DwarfDebug::finalizeModuleInfo() {
// If compile Unit has macros, emit "DW_AT_macro_info" attribute.
if (CUNode->getMacros()) {
if (useSplitDwarf())
- TheCU.addLabelDelta(TheCU.getUnitDie(), dwarf::DW_AT_macro_info,
+ TheCU.addSectionDelta(TheCU.getUnitDie(), dwarf::DW_AT_macro_info,
U.getMacroLabelBegin(),
TLOF.getDwarfMacinfoDWOSection()->getBeginSymbol());
else
diff --git a/llvm/test/DebugInfo/X86/debug-macinfo-split-dwarf.ll b/llvm/test/DebugInfo/X86/debug-macinfo-split-dwarf.ll
index 43255f2c4cef..7e5be6ce4ac5 100644
--- a/llvm/test/DebugInfo/X86/debug-macinfo-split-dwarf.ll
+++ b/llvm/test/DebugInfo/X86/debug-macinfo-split-dwarf.ll
@@ -3,7 +3,7 @@
; CHECK-LABEL:.debug_info.dwo contents:
; CHECK: DW_AT_GNU_dwo_name [DW_FORM_GNU_str_index] (indexed (00000006) string = "foo.dwo")
; CHECK-NEXT: DW_AT_GNU_dwo_id [DW_FORM_data8] (0xe0f109905cbe1fe4)
-; CHECK-NEXT: DW_AT_macro_info [DW_FORM_data4] (0x00000000)
+; CHECK-NEXT: DW_AT_macro_info [DW_FORM_sec_offset] (0x00000000)
;CHECK-LABEL:.debug_macinfo.dwo contents:
;CHECK-NEXT: DW_MACINFO_start_file - lineno: 0 filenum: 1
More information about the llvm-commits
mailing list