aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-12-12 22:59:34 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-12-12 22:59:34 +0000
commitbf47c7627812714b9427c7c847d6880194a76af6 (patch)
tree236d4237afb0add9de878604014ac77afe5f5c83 /lib/VMCore
parentb3025864e5765ad4e9d0958e96c4812aeda263f4 (diff)
downloadexternal_llvm-bf47c7627812714b9427c7c847d6880194a76af6.zip
external_llvm-bf47c7627812714b9427c7c847d6880194a76af6.tar.gz
external_llvm-bf47c7627812714b9427c7c847d6880194a76af6.tar.bz2
Fix unused value warning for value used only in assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146440 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/AutoUpgrade.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/VMCore/AutoUpgrade.cpp b/lib/VMCore/AutoUpgrade.cpp
index ef29f71..59424f9 100644
--- a/lib/VMCore/AutoUpgrade.cpp
+++ b/lib/VMCore/AutoUpgrade.cpp
@@ -85,13 +85,10 @@ bool llvm::UpgradeGlobalVariable(GlobalVariable *GV) {
// upgraded intrinsic. All argument and return casting must be provided in
// order to seamlessly integrate with existing context.
void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
- Function *F = CI->getCalledFunction();
- LLVMContext &C = CI->getContext();
-
- assert(F && "CallInst has no function associated with it.");
-
+ assert(CI->getCalledFunction() && "Intrinsic call is not direct?");
if (!NewFn) return;
+ LLVMContext &C = CI->getContext();
IRBuilder<> Builder(C);
Builder.SetInsertPoint(CI->getParent(), CI);