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)
commitf60e0a160fc8db67461bcb930924f60a7dccb9be
tree8a3cba542a276205af4b9122e9b131224683b4be
parentdc6224e0a3ce2b097f0a631de9ae1960f175dfe6
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!

llvm-svn: 220255
llvm/lib/Transforms/Utils/InlineFunction.cpp
llvm/test/DebugInfo/debug-info-always-inline.ll [new file with mode: 0644]