diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-07-29 06:45:14 +0000 | 
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-29 06:45:14 +0000 | 
| commit | a94f58aee5c813d0bd8f2da4788043ce42c1d475 (patch) | |
| tree | 2038f20eab621ac4aab02d6a29559a2899f4b7f7 /llvm/lib/Support | |
| parent | a40b912352ef1d722f220bbc28b3de7273f90ac4 (diff) | |
| download | bcm5719-llvm-a94f58aee5c813d0bd8f2da4788043ce42c1d475.tar.gz bcm5719-llvm-a94f58aee5c813d0bd8f2da4788043ce42c1d475.zip  | |
raw_ostream: Follow the 32-bit path when printing "small" decimal numbers.
llvm-svn: 77444
Diffstat (limited to 'llvm/lib/Support')
| -rw-r--r-- | llvm/lib/Support/raw_ostream.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp index 992c11a8220..d2d0f4ef2a2 100644 --- a/llvm/lib/Support/raw_ostream.cpp +++ b/llvm/lib/Support/raw_ostream.cpp @@ -89,6 +89,10 @@ raw_ostream &raw_ostream::operator<<(long N) {  }  raw_ostream &raw_ostream::operator<<(unsigned long long N) { +  // Output using 32-bit div/mod when possible. +  if (N == static_cast<unsigned long>(N)) +    return this->operator<<(static_cast<unsigned long>(N)); +    // Zero is a special case.    if (N == 0)      return *this << '0';  | 

