]> granicus.if.org Git - llvm/commit
SelectionDAG: Stop using DIVariable::isInlinedFnArgument()
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 13 Apr 2015 21:38:48 +0000 (21:38 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 13 Apr 2015 21:38:48 +0000 (21:38 +0000)
commitfafe7a41a567ad53d95c85e5e4891638a16206a2
tree00feeab798ecbc60c662402a931b7e4b3296f6f2
parent95ad263d73bc3fc9a472069e24f29a8c68fa4deb
SelectionDAG: Stop using DIVariable::isInlinedFnArgument()

Instead of calling the somewhat confusingly-named
`DIVariable::isInlinedFnArgument()`, do the check directly here.
There's possibly a small functionality change here: instead of
`dyn_cast<>`'ing `DV->getScope()` to `MDSubprogram`, I'm looking up the
scope chain for the actual subprogram.  I suspect that this is a no-op
for function arguments so in practise there isn't a real difference.

I've also added a `FIXME` to check the `inlinedAt:` chain instead, since
I wonder if that would be more reliable than the
`MDSubprogram::describes()` function.

Since this was the only user of `DIVariable::isInlinedFnArgument()`,
delete it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234799 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DebugInfo.h
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/IR/DebugInfo.cpp