[PATCH] D50959: Fix in getAllocationDataForFunction

Matthew Parkinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 01:44:32 PDT 2018


mjp41 created this revision.
mjp41 added a reviewer: theraven.
Herald added subscribers: llvm-commits, hiraditya.

Correct to use set like behaviour of AllocType.  Should check for
subset, not precise value.


Repository:
  rL LLVM

https://reviews.llvm.org/D50959

Files:
  llvm/lib/Analysis/MemoryBuiltins.cpp


Index: llvm/lib/Analysis/MemoryBuiltins.cpp
===================================================================
--- llvm/lib/Analysis/MemoryBuiltins.cpp
+++ llvm/lib/Analysis/MemoryBuiltins.cpp
@@ -150,7 +150,7 @@
     return None;
 
   const AllocFnsTy *FnData = &Iter->second;
-  if ((FnData->AllocTy & AllocTy) != FnData->AllocTy)
+  if ((FnData->AllocTy & AllocTy) == 0)
     return None;
 
   // Check function prototype.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50959.161438.patch
Type: text/x-patch
Size: 427 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180820/6dd1e55e/attachment.bin>


More information about the llvm-commits mailing list