Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 6072096

Browse files
committed
DebugInfo: Fission: Ensure the address pool entries for location lists are emitted.
The address pool was being emitted before location lists. The latter could add more entries to the pool which would be lost/never emitted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211284 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 36a3211 commit 6072096

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,9 +1038,9 @@ void DwarfDebug::endModule() {
10381038
emitDebugInfoDWO();
10391039
emitDebugAbbrevDWO();
10401040
emitDebugLineDWO();
1041+
emitDebugLocDWO();
10411042
// Emit DWO addresses.
10421043
AddrPool.emit(*Asm, Asm->getObjFileLowering().getDwarfAddrSection());
1043-
emitDebugLocDWO();
10441044
} else
10451045
// Emit info into a debug loc section.
10461046
emitDebugLoc();

test/DebugInfo/X86/fission-ranges.ll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@
4444
; Make sure we don't produce any relocations in any .dwo section (though in particular, debug_info.dwo)
4545
; HDR-NOT: .rela.{{.*}}.dwo
4646

47+
; Make sure we have enough stuff in the debug_addr to cover the address indexes
48+
; (6 is the last index in debug_loc.dwo, making 7 entries of 8 bytes each, 7 * 8
49+
; == 56 base 10 == 38 base 16)
50+
51+
; HDR: .debug_addr 00000038
52+
; HDR-NOT: .rela.{{.*}}.dwo
53+
4754
; From the code:
4855

4956
; extern int c;

0 commit comments

Comments
 (0)