1. Handle removal of all arguments for a morphed intrinsic.

2. Remove the declaration of llvm.dbg.declare.

llvm-svn: 26745
This commit is contained in:
Jim Laskey 2006-03-14 02:00:35 +00:00
parent e1421afc72
commit cf0bdffe6d
1 changed files with 4 additions and 1 deletions

View File

@ -97,6 +97,9 @@ static Function *getUpgradedIntrinsic(Function *F) {
if (F->getReturnType() != Type::VoidTy) {
return M->getOrInsertFunction(Name, Type::VoidTy, NULL);
}
} else if (Name == "llvm.dbg.declare") {
F->setName("");
return NULL;
}
break;
case 'i':
@ -230,7 +233,7 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
} else
Oprnds.push_back(UndefValue::get(NewFnTy->getParamType(i)));
}
} else {
} else if (N) {
assert(N == (CI->getNumOperands() - 1) &&
"Upgraded function needs permutation");
for (unsigned i = 0; i != N; ++i) {