projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[X86][Haswell][SchedModel] Add architecture specific scheduling models.
[oota-llvm.git]
/
lib
/
Support
/
circular_raw_ostream.cpp
diff --git
a/lib/Support/circular_raw_ostream.cpp
b/lib/Support/circular_raw_ostream.cpp
index e52996dc5051ffa73d0eb9840ae8b0a4645a665b..ca0d30db388c0b1941ad5fce0580f544b1343809 100644
(file)
--- a/
lib/Support/circular_raw_ostream.cpp
+++ b/
lib/Support/circular_raw_ostream.cpp
@@
-1,4
+1,4
@@
-//===- circula
t_raw_ostream.cpp - Implement the circular_raw_ostream class
-===//
+//===- circula
r_raw_ostream.cpp - Implement circular_raw_ostream ---------
-===//
//
// The LLVM Compiler Infrastructure
//
//
// The LLVM Compiler Infrastructure
//
@@
-12,9
+12,7
@@
//===----------------------------------------------------------------------===//
#include "llvm/Support/circular_raw_ostream.h"
//===----------------------------------------------------------------------===//
#include "llvm/Support/circular_raw_ostream.h"
-
#include <algorithm>
#include <algorithm>
-
using namespace llvm;
void circular_raw_ostream::write_impl(const char *Ptr, size_t Size) {
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) {
// 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;
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
if (BufferSize != 0) {
// Write out the buffer
- int num = std::strlen(Banner);
- TheStream->write(Banner, num);
+ TheStream->write(Banner, std::strlen(Banner));
flushBuffer();
}
}
flushBuffer();
}
}