summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorRobert Lougher <rob.lougher@gmail.com>2017-09-12 16:35:25 +0000
committerRobert Lougher <rob.lougher@gmail.com>2017-09-12 16:35:25 +0000
commitf696a22d3cea40534e7b14174998acf176a436d1 (patch)
tree6f126000402563516da586352c2c772666743b92 /llvm/lib/CodeGen/AsmPrinter
parent9f1be02fa333f7d9d4a6b3021181d15df847c03c (diff)
downloadbcm5719-llvm-f696a22d3cea40534e7b14174998acf176a436d1.tar.gz
bcm5719-llvm-f696a22d3cea40534e7b14174998acf176a436d1.zip
[DWARF] Incorrect prologue end line record.
A prologue-end line record is emitted with an incorrect associated address, which causes a debugger to show the beginning of function body to be inside the prologue. Patch written by Carlos Alberto Enciso. Differential Revision: https://reviews.llvm.org/D37625 llvm-svn: 313047
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index e44ad4ea302..835ca1f2852 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1158,7 +1158,9 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) {
return;
// Check if source location changes, but ignore DBG_VALUE and CFI locations.
- if (MI->isMetaInstruction())
+ // If the instruction is part of the function frame setup code, do not emit
+ // any line record, as there is no correspondence with any user code.
+ if (MI->isMetaInstruction() || MI->getFlag(MachineInstr::FrameSetup))
return;
const DebugLoc &DL = MI->getDebugLoc();
// When we emit a line-0 record, we don't update PrevInstLoc; so look at
OpenPOWER on IntegriCloud