aboutsummaryrefslogtreecommitdiff
path: root/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
commit8670cd3ea4dfbf86caacd270ec2441e9949bbb6a (patch)
treea213fe00c92db6d0557659779f914567e8ec4f32 /lib/CodeGen/CodeGenModule.cpp
parentc8972c61d13c67e69eb7d992560aac7613eacd37 (diff)
we are not supposed to create an improper callsite using a CallInstr; leave a fixme mentioning the simplification when CallSite can clone itself
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109575 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 057182d039..720d24a54f 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/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;