summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2016-11-30 22:49:55 +0000
committerPaul Robinson <paul.robinson@sony.com>2016-11-30 22:49:55 +0000
commit37a13ddb4bb433ddebc64bf51a10f48fe75ac49c (patch)
treebe99704493d6dafd2c5de10f444d2c499268d51b /llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h
parentba6a9a06fd68d1a408f82cb056d6ce978bade4f8 (diff)
downloadbcm5719-llvm-37a13ddb4bb433ddebc64bf51a10f48fe75ac49c.tar.gz
bcm5719-llvm-37a13ddb4bb433ddebc64bf51a10f48fe75ac49c.zip
Recommit r288212: Emit 'no line' information for interesting 'orphan' instructions.
The LLDB tests are now ready for this patch. 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: 288283
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h
index b8bbcec133f..cd02c4446a7 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h
@@ -38,10 +38,12 @@ protected:
MachineModuleInfo *MMI;
/// Previous instruction's location information. This is used to
- /// determine label location to indicate scope boundries in dwarf
- /// debug info.
+ /// determine label location to indicate scope boundaries in debug info.
+ /// We track the previous instruction's source location (if not line 0),
+ /// whether it was a label, and its parent BB.
DebugLoc PrevInstLoc;
MCSymbol *PrevLabel = nullptr;
+ const MachineBasicBlock *PrevInstBB = nullptr;
/// This location indicates end of function prologue and beginning of
/// function body.
OpenPOWER on IntegriCloud