summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-03-14 02:00:35 +0000
committerJim Laskey <jlaskey@mac.com>2006-03-14 02:00:35 +0000
commitcf0bdffe6d170125cd420bdb46bfafa8bd2fadb9 (patch)
treef231e8979dcd310182b7384aa9df873b244048b6
parente1421afc724c8e7e623cf35f170cc7fa1aa979fe (diff)
downloadbcm5719-llvm-cf0bdffe6d170125cd420bdb46bfafa8bd2fadb9.tar.gz
bcm5719-llvm-cf0bdffe6d170125cd420bdb46bfafa8bd2fadb9.zip
1. Handle removal of all arguments for a morphed intrinsic.
2. Remove the declaration of llvm.dbg.declare. llvm-svn: 26745
-rw-r--r--llvm/lib/VMCore/AutoUpgrade.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AutoUpgrade.cpp b/llvm/lib/VMCore/AutoUpgrade.cpp
index 08f6869de50..3dde1d749da 100644
--- a/llvm/lib/VMCore/AutoUpgrade.cpp
+++ b/llvm/lib/VMCore/AutoUpgrade.cpp
@@ -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) {
OpenPOWER on IntegriCloud