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 | 9ecc8761bceabd5b6392d3473c1bf181160cb2a3 (patch) | |
| tree | 8a74920cb9631d903af9c3a5ded2ccff51fa7d54 | |
| parent | 490096c8fbd40ed6dd5816b8eeb82125cae3d604 (diff) | |
| download | bcm5719-llvm-9ecc8761bceabd5b6392d3473c1bf181160cb2a3.tar.gz bcm5719-llvm-9ecc8761bceabd5b6392d3473c1bf181160cb2a3.zip | |
check for the NoAlias attribute through CallSite
llvm-svn: 159145
| -rw-r--r-- | llvm/lib/Analysis/MemoryBuiltins.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp index a9f12445350..6b21b73f22f 100644 --- a/llvm/lib/Analysis/MemoryBuiltins.cpp +++ b/llvm/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); } |

