[llvm-commits] [llvm] r98851 - /llvm/trunk/include/llvm/Support/Allocator.h
Dan Gohman
gohman at apple.com
Thu Mar 18 12:01:12 PDT 2010
Author: djg
Date: Thu Mar 18 14:01:12 2010
New Revision: 98851
URL: http://llvm.org/viewvc/llvm-project?rev=98851&view=rev
Log:
Explicitly cast std::min's arguments to avoid type mismatches.
Modified:
llvm/trunk/include/llvm/Support/Allocator.h
Modified: llvm/trunk/include/llvm/Support/Allocator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Allocator.h?rev=98851&r1=98850&r2=98851&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Allocator.h (original)
+++ llvm/trunk/include/llvm/Support/Allocator.h Thu Mar 18 14:01:12 2010
@@ -192,8 +192,8 @@
} x;
#endif
};
- return Allocator.Allocate(Size, std::min(llvm::NextPowerOf2(Size),
- offsetof(S, x)));
+ return Allocator.Allocate(Size, std::min((size_t)llvm::NextPowerOf2(Size),
+ (size_t)offsetof(S, x)));
}
#endif // LLVM_SUPPORT_ALLOCATOR_H
More information about the llvm-commits
mailing list