diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 0ac9a5aaa425..048e691e33cf 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -62,7 +62,7 @@ BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, ValueToValueMapTy &VMap, NewBB->getInstList().push_back(NewInst); VMap[&I] = NewInst; // Add instruction map to value. - hasCalls |= (isa<CallInst>(I) && !isa<DbgInfoIntrinsic>(I)); + hasCalls |= (isa<CallInst>(I) && !I.isDebugOrPseudoInst()); if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) { if (!AI->isStaticAlloca()) { hasDynamicAllocas = true; @@ -116,13 +116,13 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, for (const Argument &OldArg : OldFunc->args()) { if (Argument *NewArg = dyn_cast<Argument>(VMap[&OldArg])) { NewArgAttrs[NewArg->getArgNo()] = - OldAttrs.getParamAttributes(OldArg.getArgNo()); + OldAttrs.getParamAttrs(OldArg.getArgNo()); } } NewFunc->setAttributes( - AttributeList::get(NewFunc->getContext(), OldAttrs.getFnAttributes(), - OldAttrs.getRetAttributes(), NewArgAttrs)); + AttributeList::get(NewFunc->getContext(), OldAttrs.getFnAttrs(), + OldAttrs.getRetAttrs(), NewArgAttrs)); // Everything else beyond this point deals with function instructions, // so if we are dealing with a function declaration, we're done. @@ -410,7 +410,7 @@ void PruningFunctionCloner::CloneBlock( NewInst->setName(II->getName() + NameSuffix); VMap[&*II] = NewInst; // Add instruction map to value. NewBB->getInstList().push_back(NewInst); - hasCalls |= (isa<CallInst>(II) && !isa<DbgInfoIntrinsic>(II)); + hasCalls |= (isa<CallInst>(II) && !II->isDebugOrPseudoInst()); if (CodeInfo) { CodeInfo->OrigVMap[&*II] = NewInst; |