diff options
author | Paul Robinson <paul.robinson@sony.com> | 2018-02-14 17:35:52 +0000 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2018-02-14 17:35:52 +0000 |
commit | ee88ed6753806705e807c5914c764f49b23eb520 (patch) | |
tree | 532ba6aef9c0150baaaf49a020cbfedd0fc62b9f /llvm/lib/CodeGen | |
parent | 5df4d8892fd5670fd31098d57af148a7fccceb07 (diff) | |
download | bcm5719-llvm-ee88ed6753806705e807c5914c764f49b23eb520.tar.gz bcm5719-llvm-ee88ed6753806705e807c5914c764f49b23eb520.zip |
[DWARF] Fix incorrect prologue end line record.
The prologue-end line record must be emitted after the last
instruction that is part of the function frame setup code and before
the instruction that marks the beginning of the function body.
Patch by Carlos Alberto Enciso!
Differential Revision: https://reviews.llvm.org/D41762
llvm-svn: 325143
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 60b92b52b7f..c436950dc10 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1176,7 +1176,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 |