pass dereferenced iterator to dyn_cast

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109099 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif 2010-07-22 11:48:35 +00:00
parent 20361b9d4d
commit 85e01df73d

View File

@ -160,7 +160,7 @@ bool PartialInliner::runOnModule(Module& M) {
bool recursive = false;
for (Function::use_iterator UI = currFunc->use_begin(),
UE = currFunc->use_end(); UI != UE; ++UI)
if (Instruction* I = dyn_cast<Instruction>(UI))
if (Instruction* I = dyn_cast<Instruction>(*UI))
if (I->getParent()->getParent() == currFunc) {
recursive = true;
break;