diff options
author | Paul Robinson <paul.robinson@sony.com> | 2016-11-29 22:41:16 +0000 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2016-11-29 22:41:16 +0000 |
commit | 96de8c778bb954d01a10ce1251f6b52e89018698 (patch) | |
tree | 5e24997c148e2282cea951bcbf6c797310a5af8a /llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp | |
parent | 17062a2bf6159649cab8fabf843e352e79ee77c5 (diff) | |
download | llvm-96de8c778bb954d01a10ce1251f6b52e89018698.zip llvm-96de8c778bb954d01a10ce1251f6b52e89018698.tar.gz llvm-96de8c778bb954d01a10ce1251f6b52e89018698.tar.bz2 |
Emit 'no line' information for interesting 'orphan' instructions.
DWARF specifies that "line 0" really means "no appropriate source
location" in the line table. 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).
Differential Revision: http://reviews.llvm.org/D24180
llvm-svn: 288212
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 d30f106..5607242 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp @@ -201,8 +201,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); |