diff options
author | Chris Lattner <sabre@nondot.org> | 2008-02-18 17:28:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-02-18 17:28:21 +0000 |
commit | a9ebe5b7a002c99ea09624c06f84ba10be10d1e4 (patch) | |
tree | 0e6567cc5c88755764a9cff2b096a1bf954b3255 /lib/Analysis/BasicAliasAnalysis.cpp | |
parent | d56bb2f0fdbb64551ca7b6f5de25eda8f044ffe9 (diff) | |
download | external_llvm-a9ebe5b7a002c99ea09624c06f84ba10be10d1e4.zip external_llvm-a9ebe5b7a002c99ea09624c06f84ba10be10d1e4.tar.gz external_llvm-a9ebe5b7a002c99ea09624c06f84ba10be10d1e4.tar.bz2 |
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
Diffstat (limited to 'lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r-- | lib/Analysis/BasicAliasAnalysis.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index fa5c5b8..57d726d 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -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) |