diff options
| author | Reid Kleckner <rnk@google.com> | 2017-07-31 21:03:08 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2017-07-31 21:03:08 +0000 |
| commit | 2de471dca9ce60211dbd1f2b8bd6330e32cdbd56 (patch) | |
| tree | 415d408b914b40a4dba99efcd3995cebea479cff /llvm/lib/CodeGen | |
| parent | dac0ab272c0784bd2f468b3d3899128c6bc14021 (diff) | |
| download | bcm5719-llvm-2de471dca9ce60211dbd1f2b8bd6330e32cdbd56.tar.gz bcm5719-llvm-2de471dca9ce60211dbd1f2b8bd6330e32cdbd56.zip | |
[codeview] Ignore DBG_VALUEs when choosing a BB start source loc
When the first instruction of a basic block has no location (consider a
LEA materializing the address of an alloca for a call), we want to start
the line table for the block with the first valid source location in the
block. We need to ignore DBG_VALUE instructions during this scan to get
decent line tables.
llvm-svn: 309628
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index c9686cccfdf..38ae15cbd98 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -2157,6 +2157,8 @@ void CodeViewDebug::beginInstruction(const MachineInstr *MI) { DebugLoc DL = MI->getDebugLoc(); if (!DL && MI->getParent() != PrevInstBB) { for (const auto &NextMI : *MI->getParent()) { + if (NextMI.isDebugValue()) + continue; DL = NextMI.getDebugLoc(); if (DL) break; |

