aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/raw_ostream.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-10-17 21:25:41 +0000
committerZachary Turner <zturner@google.com>2016-10-17 21:25:41 +0000
commit9d58e362d21264df216cb6ca2e6f7d0e421061ab (patch)
tree6ab103d7c6d51004f8de7382ae59473da30fa71f /llvm/lib/Support/raw_ostream.cpp
parent47e2c0a9cb03a4cb48af6d772e064037523485e3 (diff)
downloadllvm-9d58e362d21264df216cb6ca2e6f7d0e421061ab.zip
llvm-9d58e362d21264df216cb6ca2e6f7d0e421061ab.tar.gz
llvm-9d58e362d21264df216cb6ca2e6f7d0e421061ab.tar.bz2
Revert formatting changes.
This reverts r288425 and r284428 as they are causing test crashes on some systems. llvm-svn: 284429
Diffstat (limited to 'llvm/lib/Support/raw_ostream.cpp')
-rw-r--r--llvm/lib/Support/raw_ostream.cpp28
1 files changed, 9 insertions, 19 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index b040e0a..8101bc1 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/lib/Support/raw_ostream.cpp
@@ -114,27 +114,27 @@ void raw_ostream::SetBufferAndMode(char *BufferStart, size_t Size,
}
raw_ostream &raw_ostream::operator<<(unsigned long N) {
- write_ulong(*this, N, IntegerStyle::Integer);
+ write_ulong(*this, N, 0);
return *this;
}
raw_ostream &raw_ostream::operator<<(long N) {
- write_long(*this, N, IntegerStyle::Integer);
+ write_long(*this, N, 0);
return *this;
}
raw_ostream &raw_ostream::operator<<(unsigned long long N) {
- write_ulonglong(*this, N, IntegerStyle::Integer);
+ write_ulonglong(*this, N, 0);
return *this;
}
raw_ostream &raw_ostream::operator<<(long long N) {
- write_longlong(*this, N, IntegerStyle::Integer);
+ write_longlong(*this, N, 0);
return *this;
}
raw_ostream &raw_ostream::write_hex(unsigned long long N) {
- llvm::write_hex(*this, N, HexStyle::Lower);
+ llvm::write_hex(*this, N, 0, false, false);
return *this;
}
@@ -179,12 +179,12 @@ raw_ostream &raw_ostream::write_escaped(StringRef Str,
}
raw_ostream &raw_ostream::operator<<(const void *P) {
- llvm::write_hex(*this, (uintptr_t)P, HexStyle::PrefixLower);
+ llvm::write_hex(*this, (uintptr_t)P, 0, false, true);
return *this;
}
raw_ostream &raw_ostream::operator<<(double N) {
- llvm::write_double(*this, N, FloatStyle::Exponent);
+ llvm::write_double(*this, N, 0, 0, FloatStyle::Exponent);
return *this;
}
@@ -331,19 +331,9 @@ raw_ostream &raw_ostream::operator<<(const FormattedString &FS) {
raw_ostream &raw_ostream::operator<<(const FormattedNumber &FN) {
if (FN.Hex) {
- HexStyle Style;
- if (FN.Upper && FN.HexPrefix)
- Style = HexStyle::PrefixUpper;
- else if (FN.Upper && !FN.HexPrefix)
- Style = HexStyle::Upper;
- else if (!FN.Upper && FN.HexPrefix)
- Style = HexStyle::PrefixLower;
- else
- Style = HexStyle::Lower;
- llvm::write_hex(*this, FN.HexValue, Style, FN.Width, None);
+ llvm::write_hex(*this, FN.HexValue, FN.Width, FN.Upper, FN.HexPrefix);
} else {
- llvm::write_longlong(*this, FN.DecValue, IntegerStyle::Integer, None,
- FN.Width);
+ llvm::write_longlong(*this, FN.DecValue, FN.Width);
}
return *this;
}