summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-09 20:43:54 +0000
committerChris Lattner <sabre@nondot.org>2010-04-09 20:43:54 +0000
commit5c289f217b77320e475375b958d7bd7ecbe7e0a3 (patch)
tree8086fcfc95967faff5364fca607136c1c7b83c08
parenta2ca3fa781a0de0148d215c6a28b5a725dd61fb1 (diff)
downloadbcm5719-llvm-5c289f217b77320e475375b958d7bd7ecbe7e0a3.tar.gz
bcm5719-llvm-5c289f217b77320e475375b958d7bd7ecbe7e0a3.zip
clean this up, fix std::min ambiguity on some platforms.
llvm-svn: 100894
-rw-r--r--llvm/lib/Support/circular_raw_ostream.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/Support/circular_raw_ostream.cpp b/llvm/lib/Support/circular_raw_ostream.cpp
index e52996dc505..ca0d30db388 100644
--- a/llvm/lib/Support/circular_raw_ostream.cpp
+++ b/llvm/lib/Support/circular_raw_ostream.cpp
@@ -1,4 +1,4 @@
-//===- circulat_raw_ostream.cpp - Implement the circular_raw_ostream class -===//
+//===- circular_raw_ostream.cpp - Implement circular_raw_ostream ----------===//
//
// The LLVM Compiler Infrastructure
//
@@ -12,9 +12,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/circular_raw_ostream.h"
-
#include <algorithm>
-
using namespace llvm;
void circular_raw_ostream::write_impl(const char *Ptr, size_t Size) {
@@ -25,7 +23,8 @@ void circular_raw_ostream::write_impl(const char *Ptr, size_t Size) {
// Write into the buffer, wrapping if necessary.
while (Size != 0) {
- unsigned Bytes = std::min(Size, BufferSize - (Cur - BufferArray));
+ unsigned Bytes =
+ std::min(unsigned(Size), unsigned(BufferSize - (Cur - BufferArray)));
memcpy(Cur, Ptr, Bytes);
Size -= Bytes;
Cur += Bytes;
@@ -37,11 +36,10 @@ void circular_raw_ostream::write_impl(const char *Ptr, size_t Size) {
}
}
-void circular_raw_ostream::flushBufferWithBanner(void) {
+void circular_raw_ostream::flushBufferWithBanner() {
if (BufferSize != 0) {
// Write out the buffer
- int num = std::strlen(Banner);
- TheStream->write(Banner, num);
+ TheStream->write(Banner, std::strlen(Banner));
flushBuffer();
}
}
OpenPOWER on IntegriCloud