summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2016-12-16 23:54:33 +0000
committerPaul Robinson <paul.robinson@sony.com>2016-12-16 23:54:33 +0000
commit2dfb68821410a6cc84951bc8c2d5c232fba148b8 (patch)
treeb0c5a605d4bdc955727f4a59baef5b9c611dadc9 /llvm/lib/CodeGen
parent23cbb11e27cebb4132f313f6cde662b35a4515d2 (diff)
downloadbcm5719-llvm-2dfb68821410a6cc84951bc8c2d5c232fba148b8.tar.gz
bcm5719-llvm-2dfb68821410a6cc84951bc8c2d5c232fba148b8.zip
Allow "line 0" to be the first explicit debug location in a function.
Feedback on r289468 from Adrian Prantl. llvm-svn: 290012
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index f83a340219d..a8d46c22681 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1063,7 +1063,7 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) {
// We have an explicit location, different from the previous location.
// Don't repeat a line-0 record, but otherwise emit the new location.
// (The new location might be an explicit line 0, which we do emit.)
- if (DL.getLine() == 0 && LastAsmLine == 0)
+ if (PrevInstLoc && DL.getLine() == 0 && LastAsmLine == 0)
return;
unsigned Flags = 0;
if (DL == PrologEndLoc) {
OpenPOWER on IntegriCloud