[llvm] r250383 - Speculatively unbreak Windows build
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 15 02:17:16 PDT 2015
Author: majnemer
Date: Thu Oct 15 04:17:15 2015
New Revision: 250383
URL: http://llvm.org/viewvc/llvm-project?rev=250383&view=rev
Log:
Speculatively unbreak Windows build
<windows.h> defines macros named min and max in conflict with
<algorithm>. Prevent macro expansion by wrapping std::min in
parenthesis.
Modified:
llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp
Modified: llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp?rev=250383&r1=250382&r2=250383&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp (original)
+++ llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp Thu Oct 15 04:17:15 2015
@@ -361,8 +361,8 @@ static void dumpStructure(MemoryBufferRe
if (BytesLeftToReadInStream == 0)
break;
- uint32_t BytesToReadInBlock =
- std::min(BytesLeftToReadInStream, static_cast<uint32_t>(SB->BlockSize));
+ uint32_t BytesToReadInBlock = (std::min)(
+ BytesLeftToReadInStream, static_cast<uint32_t>(SB->BlockSize));
auto StreamBlockData =
StringRef(M.getBufferStart() + StreamBlockOffset, BytesToReadInBlock);
if (auto EC = checkOffset(M, StreamBlockData))
More information about the llvm-commits
mailing list