]> granicus.if.org Git - clang/commitdiff
we are not supposed to create an improper callsite using a CallInstr; leave a fixme...
authorGabor Greif <ggreif@gmail.com>
Wed, 28 Jul 2010 09:19:33 +0000 (09:19 +0000)
committerGabor Greif <ggreif@gmail.com>
Wed, 28 Jul 2010 09:19:33 +0000 (09:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109575 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index 057182d0392b5be6bf289e2e1b90d1701de13436..720d24a54fe18b03c53afccecd78646e6e719cf7 100644 (file)
@@ -1329,6 +1329,7 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
     // TODO: Do invokes ever occur in C code?  If so, we should handle them too.
     llvm::Value::use_iterator I = UI++; // Increment before the CI is erased.
     llvm::CallInst *CI = dyn_cast<llvm::CallInst>(*I);
+    if (!CI) continue; // FIXME: when we allow Invoke, just do CallSite CS(*I)
     llvm::CallSite CS(CI);
     if (!CI || !CS.isCallee(I)) continue;