diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-12-12 22:59:34 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-12-12 22:59:34 +0000 |
commit | 2eb3ade08916bece705082ca9d2b148361484aab (patch) | |
tree | ca3b7bd164424d13dff3258840d49a543601e8f1 /llvm/lib/VMCore/AutoUpgrade.cpp | |
parent | a549e315be9ca414677fc1af44eb7ab548ca5f9a (diff) | |
download | bcm5719-llvm-2eb3ade08916bece705082ca9d2b148361484aab.tar.gz bcm5719-llvm-2eb3ade08916bece705082ca9d2b148361484aab.zip |
Fix unused value warning for value used only in assert.
llvm-svn: 146440
Diffstat (limited to 'llvm/lib/VMCore/AutoUpgrade.cpp')
-rw-r--r-- | llvm/lib/VMCore/AutoUpgrade.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/AutoUpgrade.cpp b/llvm/lib/VMCore/AutoUpgrade.cpp index ef29f71d173..59424f9644b 100644 --- a/llvm/lib/VMCore/AutoUpgrade.cpp +++ b/llvm/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); |