Various crash reporting tools have a problem with the dwarf generated for
[oota-llvm.git] / lib / VMCore / AutoUpgrade.cpp
index ef29f71d173b234ba4b77a0eb6c5186ae9ab1b0b..59424f9644b3dff8fc401f9388d5e641d46d50ce 100644 (file)
@@ -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);