summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-28 09:19:33 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-28 09:19:33 +0000
commit79ac9ed7acfc5854b8c76ddd343fead11fa2e1d7 (patch)
treebbfaa7c93140d78633799dd4aa09589d6efd2af4 /clang/lib/CodeGen/CodeGenModule.cpp
parent9e40956aeab0558ade96e537997402e568fe530a (diff)
downloadbcm5719-llvm-79ac9ed7acfc5854b8c76ddd343fead11fa2e1d7.tar.gz
bcm5719-llvm-79ac9ed7acfc5854b8c76ddd343fead11fa2e1d7.zip
we are not supposed to create an improper callsite using a CallInstr; leave a fixme mentioning the simplification when CallSite can clone itself
llvm-svn: 109575
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 057182d0392..720d24a54fe 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -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;
OpenPOWER on IntegriCloud