From a1079b7d51ebd2bdce335f22387db85eacbdab4e Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Thu, 15 Oct 2015 09:17:15 +0000 Subject: [PATCH] Speculatively unbreak Windows build defines macros named min and max in conflict with . 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 --- tools/llvm-pdbdump/llvm-pdbdump.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/llvm-pdbdump/llvm-pdbdump.cpp b/tools/llvm-pdbdump/llvm-pdbdump.cpp index 5b5cf00956c..7af8c5fe352 100644 --- a/tools/llvm-pdbdump/llvm-pdbdump.cpp +++ b/tools/llvm-pdbdump/llvm-pdbdump.cpp @@ -361,8 +361,8 @@ static void dumpStructure(MemoryBufferRef M) { if (BytesLeftToReadInStream == 0) break; - uint32_t BytesToReadInBlock = - std::min(BytesLeftToReadInStream, static_cast(SB->BlockSize)); + uint32_t BytesToReadInBlock = (std::min)( + BytesLeftToReadInStream, static_cast(SB->BlockSize)); auto StreamBlockData = StringRef(M.getBufferStart() + StreamBlockOffset, BytesToReadInBlock); if (auto EC = checkOffset(M, StreamBlockData)) -- 2.34.1