Do not attribute static allocas to the call site's DebugLoc.
authorPaul Robinson <paul_robinson@playstation.sony.com>
Tue, 21 Oct 2014 01:00:55 +0000 (01:00 +0000)
committerPaul Robinson <paul_robinson@playstation.sony.com>
Tue, 21 Oct 2014 01:00:55 +0000 (01:00 +0000)
commitf8c9d3d3c2525b529172577f4b42be1d401a6215
tree29c33b2a57f4d8f7d36ea4b206f2b03300493a5c
parentf46dd92ba4e162bb3487455be6c96a1e88b34afd
Do not attribute static allocas to the call site's DebugLoc.

When functions are inlined, instructions without debug information are
attributed to the call site's DebugLoc. After inlining, inlined static
allocas are moved to the caller's entry block, adjacent to the caller's
original static alloca instructions. By retaining the call site's
DebugLoc, these instructions could cause instructions that were
subsequently inserted at the entry block to pick up the same DebugLoc.

Patch by Wolfgang Pieb!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220255 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/InlineFunction.cpp
test/DebugInfo/debug-info-always-inline.ll [new file with mode: 0644]