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
This commit is contained in:
Gabor Greif 2010-07-28 09:19:33 +00:00
Родитель c8972c61d1
Коммит 8670cd3ea4
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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;