Skip to content

Commit

Permalink
Speculatively unbreak Windows build
Browse files Browse the repository at this point in the history
<windows.h> defines macros named min and max in conflict with
<algorithm>.  Prevent macro expansion by wrapping std::min in
parenthesis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250383 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
majnemer committed Oct 15, 2015
1 parent 89b9248 commit a1079b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/llvm-pdbdump/llvm-pdbdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a1079b7

Please sign in to comment.