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)
commit93faeecd8fa1fc148f2ee0d0cb64f11c3d41ce49
tree62142adf4f8c4367fa65bd5bf931c9ae52dae496
parent5904fba8c9a00eb90cd9a06a3afe84c72db98ffc
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

llvm-svn: 317702
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/DebugInfo/AArch64/inlined-argument.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/live-debug-variables.ll