1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

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.

llvm-svn: 250383
This commit is contained in:
David Majnemer 2015-10-15 09:17:15 +00:00
parent 47bb2beb49
commit 3d207d083d

View File

@ -361,8 +361,8 @@ static void dumpStructure(MemoryBufferRef M) {
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))