don't bother calling getUnderlyingObject for non-pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47272 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-02-18 17:28:21 +00:00
parent 39564499c4
commit bb494bcb0e

View File

@ -262,7 +262,8 @@ BasicAliasAnalysis::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
bool passedAsArg = false;
for (CallSite::arg_iterator CI = CS.arg_begin(), CE = CS.arg_end();
CI != CE; ++CI)
if (getUnderlyingObject(CI->get()) == P)
if (isa<PointerType>((*CI)->getType()) &&
getUnderlyingObject(*CI) == P)
passedAsArg = true;
if (!passedAsArg)