diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-06-25 16:17:54 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-06-25 16:17:54 +0000 |
commit | e8742d084c54e9cd230fa03d368f0fedac2106cb (patch) | |
tree | 917e55aaf3f11da0e80d81f982eec1d64541f4f6 /lib/Analysis | |
parent | 986da6c3fdce52082288094f592e60ba165ae71c (diff) | |
download | external_llvm-e8742d084c54e9cd230fa03d368f0fedac2106cb.zip external_llvm-e8742d084c54e9cd230fa03d368f0fedac2106cb.tar.gz external_llvm-e8742d084c54e9cd230fa03d368f0fedac2106cb.tar.bz2 |
check for the NoAlias attribute through CallSite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/MemoryBuiltins.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/MemoryBuiltins.cpp b/lib/Analysis/MemoryBuiltins.cpp index a9f1244..6b21b73 100644 --- a/lib/Analysis/MemoryBuiltins.cpp +++ b/lib/Analysis/MemoryBuiltins.cpp @@ -118,8 +118,8 @@ static const AllocFnsTy *getAllocationData(const Value *V, AllocType AllocTy, } static bool hasNoAliasAttr(const Value *V, bool LookThroughBitCast) { - Function *Callee = getCalledFunction(V, LookThroughBitCast); - return Callee && Callee->hasFnAttr(Attribute::NoAlias); + ImmutableCallSite CS(LookThroughBitCast ? V->stripPointerCasts() : V); + return CS && CS.hasFnAttr(Attribute::NoAlias); } |