Do not optimize debug locations across section boundaries
authorPierre Calixte <pierre.calixte@mediatek.com>
Tue, 9 May 2023 00:03:35 +0000 (00:03 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 9 May 2023 00:12:59 +0000 (00:12 +0000)
commit971d982bd45c3c3544dcf8d1e67df39e8c063877
tree66120b1b54e095d78311e5262d70799f1e83bdf5
parentc8b50b860068bb9116c17ad3d8b616285eb68c71
Do not optimize debug locations across section boundaries

Prevent optimization of DebugLoc across section boundaries, such optimization will yield incorrect source location if memory layout of sections does not strictly match the Asm file.

Reviewed By: #debug-info, dblaikie, MaskRay

Differential Revision: https://reviews.llvm.org/D149294
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/test/DebugInfo/X86/basic-block-sections-debug-lineinfo-at-section-boundary.ll [new file with mode: 0644]