[llvm] r307205 - Fix std::min ambiguity between uint32 and size_t.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 5 14:59:20 PDT 2017
Author: zturner
Date: Wed Jul 5 14:59:20 2017
New Revision: 307205
URL: http://llvm.org/viewvc/llvm-project?rev=307205&view=rev
Log:
Fix std::min ambiguity between uint32 and size_t.
Modified:
llvm/trunk/tools/llvm-pdbutil/FormatUtil.cpp
Modified: llvm/trunk/tools/llvm-pdbutil/FormatUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/FormatUtil.cpp?rev=307205&r1=307204&r2=307205&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/FormatUtil.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/FormatUtil.cpp Wed Jul 5 14:59:20 2017
@@ -21,7 +21,7 @@ std::string llvm::pdb::truncateStringBac
return S;
assert(MaxLen >= 3);
- uint32_t FinalLen = std::min(S.size(), MaxLen - 3);
+ uint32_t FinalLen = std::min<size_t>(S.size(), MaxLen - 3);
S = S.take_front(FinalLen);
return std::string(S) + std::string("...");
}
More information about the llvm-commits
mailing list