diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 10 |
2 files changed, 3 insertions, 11 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; diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 20467c93adb..fc302010b6e 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -39,16 +39,6 @@ using namespace llvm::dwarf; DIScopeRef DIScope::getRef() const { return MDScopeRef::get(get()); } -bool DIVariable::isInlinedFnArgument(const Function *CurFn) { - assert(CurFn && "Invalid function"); - DISubprogram SP = dyn_cast<MDSubprogram>(getContext()); - if (!SP) - return false; - // This variable is not inlined function argument if its scope - // does not describe current function. - return !SP.describes(CurFn); -} - void DICompileUnit::replaceSubprograms(DIArray Subprograms) { get()->replaceSubprograms(MDSubprogramArray(Subprograms)); } |