diff options
author | Paul Robinson <paul.robinson@sony.com> | 2016-12-12 20:49:11 +0000 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2016-12-12 20:49:11 +0000 |
commit | ac7fe5e0c47a093b0fd8fd4972734ce143475c0e (patch) | |
tree | c1ad8898c47dad34c95ac4f56424b115613fe65a /llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp | |
parent | d4be88913ed998522a6929bef134e0d16726ee15 (diff) | |
download | llvm-ac7fe5e0c47a093b0fd8fd4972734ce143475c0e.zip llvm-ac7fe5e0c47a093b0fd8fd4972734ce143475c0e.tar.gz llvm-ac7fe5e0c47a093b0fd8fd4972734ce143475c0e.tar.bz2 |
Recommit r288212: Emit 'no line' information for interesting 'orphan' instructions.
DWARF specifies that "line 0" really means "no appropriate source
location" in the line table. By default, use this for branch targets
and some other cases that have no specified source location, to
prevent inheriting unfortunate line numbers from physically preceding
instructions (which might be from completely unrelated source).
Updated patch allows enabling or suppressing this behavior for all
unspecified source locations.
Differential Revision: http://reviews.llvm.org/D24180
llvm-svn: 289468
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp index ce57f17..aa71449 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp @@ -200,8 +200,10 @@ void DebugHandlerBase::endInstruction() { assert(CurMI != nullptr); // Don't create a new label after DBG_VALUE instructions. // They don't generate code. - if (!CurMI->isDebugValue()) + if (!CurMI->isDebugValue()) { PrevLabel = nullptr; + PrevInstBB = CurMI->getParent(); + } DenseMap<const MachineInstr *, MCSymbol *>::iterator I = LabelsAfterInsn.find(CurMI); |