[llvm] r340807 - Fix in getAllocationDataForFunction

David Chisnall via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 28 01:59:06 PDT 2018


Author: theraven
Date: Tue Aug 28 01:59:06 2018
New Revision: 340807

URL: http://llvm.org/viewvc/llvm-project?rev=340807&view=rev
Log:
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

Modified:
    llvm/trunk/lib/Analysis/MemoryBuiltins.cpp

Modified: llvm/trunk/lib/Analysis/MemoryBuiltins.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryBuiltins.cpp?rev=340807&r1=340806&r2=340807&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryBuiltins.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryBuiltins.cpp Tue Aug 28 01:59:06 2018
@@ -150,7 +150,7 @@ getAllocationDataForFunction(const Funct
     return None;
 
   const AllocFnsTy *FnData = &Iter->second;
-  if ((FnData->AllocTy & AllocTy) != FnData->AllocTy)
+  if ((FnData->AllocTy & AllocTy) == 0)
     return None;
 
   // Check function prototype.




More information about the llvm-commits mailing list