don't bother calling getUnderlyingObject for non-pointers.

llvm-svn: 47272
This commit is contained in:
Chris Lattner 2008-02-18 17:28:21 +00:00
parent 02d2bc8d3e
commit 8ed77c41d8
1 changed files with 2 additions and 1 deletions

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)