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

Commit

Permalink
DebugInfo: Fission: Ensure the address pool entries for location list…
Browse files Browse the repository at this point in the history
…s 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
  • Loading branch information
dwblaikie committed Jun 19, 2014
1 parent 36a3211 commit 6072096
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1038,9 +1038,9 @@ void DwarfDebug::endModule() {
emitDebugInfoDWO();
emitDebugAbbrevDWO();
emitDebugLineDWO();
emitDebugLocDWO();
// Emit DWO addresses.
AddrPool.emit(*Asm, Asm->getObjFileLowering().getDwarfAddrSection());
emitDebugLocDWO();
} else
// Emit info into a debug loc section.
emitDebugLoc();
Expand Down
7 changes: 7 additions & 0 deletions test/DebugInfo/X86/fission-ranges.ll
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@
; Make sure we don't produce any relocations in any .dwo section (though in particular, debug_info.dwo)
; HDR-NOT: .rela.{{.*}}.dwo

; Make sure we have enough stuff in the debug_addr to cover the address indexes
; (6 is the last index in debug_loc.dwo, making 7 entries of 8 bytes each, 7 * 8
; == 56 base 10 == 38 base 16)

; HDR: .debug_addr 00000038
; HDR-NOT: .rela.{{.*}}.dwo

; From the code:

; extern int c;
Expand Down

0 comments on commit 6072096

Please sign in to comment.