Pārlūkot izejas kodu

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340807 91177308-0d34-0410-b5e6-96231b3b80d8
David Chisnall 7 gadi atpakaļ
vecāks
revīzija
4f69adc655
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      lib/Analysis/MemoryBuiltins.cpp

+ 1 - 1
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.