]> granicus.if.org Git - llvm/commit
[codeview] Use the first valid source location at the top of every MBB
authorReid Kleckner <rnk@google.com>
Fri, 30 Jun 2017 21:33:44 +0000 (21:33 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 30 Jun 2017 21:33:44 +0000 (21:33 +0000)
commit478b1eca4d38d36ce2ae4f0d9b8fbc5621a8663b
tree8a06b5411f91e75a1428de8f2a622075f5119106
parent515de5651c1930f348607677747d12d50b37b493
[codeview] Use the first valid source location at the top of every MBB

If the instructions at the beginning of the block have no location,
we're better off using the location of the first instruction in the
current basic block. At the very least, that instruction post-dominates
this one, whereas if we don't emit a .cv_loc directive, we end up using
the potentially invalid location that falls through from the previous
block.

We could probably do better here by emitting some kind of ".cv_loc end"
directive that stops the line table entry of the previous .cv_loc
directive from bleeding out of its basic block. This would improve the
line table when an entire MBB has no valid location info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306889 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
lib/CodeGen/AsmPrinter/CodeViewDebug.h
test/DebugInfo/COFF/lines-bb-start.ll [new file with mode: 0644]
test/DebugInfo/COFF/local-variables.ll