From: Jim Laskey Date: Tue, 14 Mar 2006 02:00:35 +0000 (+0000) Subject: 1. Handle removal of all arguments for a morphed intrinsic. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5a588a96369bd7e3edb918395a997009d94c7e6e;p=oota-llvm.git 1. Handle removal of all arguments for a morphed intrinsic. 2. Remove the declaration of llvm.dbg.declare. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26745 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/AutoUpgrade.cpp b/lib/VMCore/AutoUpgrade.cpp index 08f6869de50..3dde1d749da 100644 --- a/lib/VMCore/AutoUpgrade.cpp +++ b/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) {