[llvm] r339777 - [GVN] Fix typo in IsValueFullyAvailableInBlock. NFC.

Marcello Maggioni via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 15 08:06:53 PDT 2018


Author: mggm
Date: Wed Aug 15 08:06:53 2018
New Revision: 339777

URL: http://llvm.org/viewvc/llvm-project?rev=339777&view=rev
Log:
[GVN] Fix typo in IsValueFullyAvailableInBlock. NFC.

DenseMap insert() method return a pair<iterator, bool>
not pair<iterator, char>
Noticed it and thought I might just fix it ...

Modified:
    llvm/trunk/lib/Transforms/Scalar/GVN.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=339777&r1=339776&r2=339777&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Wed Aug 15 08:06:53 2018
@@ -678,7 +678,7 @@ static bool IsValueFullyAvailableInBlock
 
   // Optimistically assume that the block is fully available and check to see
   // if we already know about this block in one lookup.
-  std::pair<DenseMap<BasicBlock*, char>::iterator, char> IV =
+  std::pair<DenseMap<BasicBlock*, char>::iterator, bool> IV =
     FullyAvailableBlocks.insert(std::make_pair(BB, 2));
 
   // If the entry already existed for this block, return the precomputed value.




More information about the llvm-commits mailing list