summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2018-10-05 18:29:24 +0000
committerMatthias Braun <matze@braunis.de>2018-10-05 18:29:24 +0000
commitfb43114ba25f81b3c22a8cb27c532b559100d63a (patch)
tree59a0834b1c4c5c00e20b1f63dccdb5a0ba7f17a2 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
parent90fc1007425b3e0a46146eaba1afcde8f2787e5c (diff)
downloadbcm5719-llvm-fb43114ba25f81b3c22a8cb27c532b559100d63a.tar.gz
bcm5719-llvm-fb43114ba25f81b3c22a8cb27c532b559100d63a.zip
DwarfDebug: Pick next location in case of missing location at block begin
Context: Compiler generated instructions do not have a debug location assigned to them. However emitting 0-line records for all of them bloats the line tables for very little benefit so we usually avoid doing that. Not emitting anything will lead to the previous debug location getting applied to the locationless instructions. This is not desirable for block begin and after labels. Previously we would emit simply emit line-0 records in this case, this patch changes the behavior to do a forward search for a debug location in these cases before emitting a line-0 record to further reduce line table bloat. Inspired by the discussion in https://reviews.llvm.org/D52862 llvm-svn: 343874
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 23aa2ba094e..ba40ad28eb7 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -719,6 +719,9 @@ public:
bool tuneForLLDB() const { return DebuggerTuning == DebuggerKind::LLDB; }
bool tuneForSCE() const { return DebuggerTuning == DebuggerKind::SCE; }
/// @}
+
+private:
+ void emitDebugLoc(const DebugLoc &DL);
};
} // end namespace llvm
OpenPOWER on IntegriCloud