diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-13 21:38:48 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-13 21:38:48 +0000 |
commit | 745a5db4447cd1b6ff2078e40fe02b33136b563b (patch) | |
tree | f110188757b61ebd9799b888ccdb60165cf5e52a /llvm/lib/CodeGen/SelectionDAG | |
parent | 168ddf4dc1421b98a091464ac372079b63f53feb (diff) | |
download | bcm5719-llvm-745a5db4447cd1b6ff2078e40fe02b33136b563b.tar.gz bcm5719-llvm-745a5db4447cd1b6ff2078e40fe02b33136b563b.zip |
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.
llvm-svn: 234799
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index bb0d24a6d0b..5c626beff42 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -4461,8 +4461,10 @@ bool SelectionDAGBuilder::EmitFuncArgumentDbgValue( const TargetInstrInfo *TII = DAG.getSubtarget().getInstrInfo(); // Ignore inlined function arguments here. + // + // FIXME: Should we be checking DL->inlinedAt() to determine this? DIVariable DV(Variable); - if (DV.isInlinedFnArgument(MF.getFunction())) + if (!DV->getScope()->getSubprogram()->describes(MF.getFunction())) return false; Optional<MachineOperand> Op; |