OSDN Git Service

Handle inlined variables in SelectionDAGBuilder::EmitFuncArgumentDbgValue().
authorAdrian Prantl <aprantl@apple.com>
Wed, 8 Nov 2017 18:27:13 +0000 (18:27 +0000)
committerAdrian Prantl <aprantl@apple.com>
Wed, 8 Nov 2017 18:27:13 +0000 (18:27 +0000)
commit27b6b3117fa25c74ea38f81bc0c9ca6a58a1c431
treeb30330067259e0c0df8fddf36c3e458e9f8e9f50
parent15443bdc4b631d0d2db4b92822bcd7ec828f8ada
Handle inlined variables in SelectionDAGBuilder::EmitFuncArgumentDbgValue().

In 2010 a commit with no testcase and no further explanation
explicitly disabled the handling of inlined variables in
EmitFuncArgumentDbgValue(). I don't think there is a good reason for
this any more and re-enabling this adds debug locations for variables
associated with an LLVM function argument in functions that are
inlined into the first basic block. The only downside of doing this is
that we may insert a DBG_VALUE before the inlined scope, but (1) this
could be filtered out later, and (2) LiveDebugValues will not
propagate it into subsequent basic blocks if they don't dominate the
variable's lexical scope, so this seems like a small price to pay.

rdar://problem/26228128

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317702 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/DebugInfo/AArch64/inlined-argument.ll [new file with mode: 0644]
test/DebugInfo/X86/live-debug-variables.ll