Reverting r340807.
authorAndrew Kaylor <andrew.kaylor@intel.com>
Thu, 30 Aug 2018 18:37:18 +0000 (18:37 +0000)
committerAndrew Kaylor <andrew.kaylor@intel.com>
Thu, 30 Aug 2018 18:37:18 +0000 (18:37 +0000)
This patch restores the old behavior of getAllocationDataForFunction in MemoryBuiltins.cpp.

llvm-svn: 341091

llvm/lib/Analysis/MemoryBuiltins.cpp

index e93021b..686ad29 100644 (file)
@@ -150,7 +150,7 @@ getAllocationDataForFunction(const Function *Callee, AllocType AllocTy,
     return None;
 
   const AllocFnsTy *FnData = &Iter->second;
-  if ((FnData->AllocTy & AllocTy) == 0)
+  if ((FnData->AllocTy & AllocTy) != FnData->AllocTy)
     return None;
 
   // Check function prototype.