[llvm] r286498 - Fix type ambiguity with std::max

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 12:35:21 PST 2016


Author: zturner
Date: Thu Nov 10 14:35:21 2016
New Revision: 286498

URL: http://llvm.org/viewvc/llvm-project?rev=286498&view=rev
Log:
Fix type ambiguity with std::max

Modified:
    llvm/trunk/lib/Support/raw_ostream.cpp

Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=286498&r1=286497&r2=286498&view=diff
==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Thu Nov 10 14:35:21 2016
@@ -370,7 +370,7 @@ raw_ostream &raw_ostream::operator<<(con
     unsigned Power = 0;
     if (MaxOffset > 0)
       Power = llvm::Log2_64_Ceil(MaxOffset);
-    OffsetWidth = std::max(4ULL, llvm::alignTo(Power, 4) / 4);
+    OffsetWidth = std::max<uint64_t>(4, llvm::alignTo(Power, 4) / 4);
   }
 
   // The width of a block of data including all spaces for group separators.




More information about the llvm-commits mailing list