diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2018-08-28 08:59:06 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2018-08-28 08:59:06 +0000 |
commit | 5e52cadf89472a1165dad65c0e1c83c4b71aa9f6 (patch) | |
tree | 0c2d50eaebe842e241fdfb0165982344488d4687 /llvm/lib/Analysis/MemoryBuiltins.cpp | |
parent | f0eedbce4418cfde0ee3bb18fcbd44fcb7f2da2d (diff) | |
download | bcm5719-llvm-5e52cadf89472a1165dad65c0e1c83c4b71aa9f6.tar.gz bcm5719-llvm-5e52cadf89472a1165dad65c0e1c83c4b71aa9f6.zip |
Fix in getAllocationDataForFunction
Summary:
Correct to use set like behaviour of AllocType. Should check for
subset, not precise value.
Reviewers: theraven
Reviewed By: theraven
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D50959
llvm-svn: 340807
Diffstat (limited to 'llvm/lib/Analysis/MemoryBuiltins.cpp')
-rw-r--r-- | llvm/lib/Analysis/MemoryBuiltins.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp index 686ad294378..e93021b9d9b 100644 --- a/llvm/lib/Analysis/MemoryBuiltins.cpp +++ b/llvm/lib/Analysis/MemoryBuiltins.cpp @@ -150,7 +150,7 @@ getAllocationDataForFunction(const Function *Callee, AllocType AllocTy, return None; const AllocFnsTy *FnData = &Iter->second; - if ((FnData->AllocTy & AllocTy) != FnData->AllocTy) + if ((FnData->AllocTy & AllocTy) == 0) return None; // Check function prototype. |