projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8eef44
)
raw_ostream: Follow the 32-bit path when printing "small" decimal numbers.
author
Daniel Dunbar
<daniel@zuster.org>
Wed, 29 Jul 2009 06:45:14 +0000
(06:45 +0000)
committer
Daniel Dunbar
<daniel@zuster.org>
Wed, 29 Jul 2009 06:45:14 +0000
(06:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77444
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/raw_ostream.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/raw_ostream.cpp
b/lib/Support/raw_ostream.cpp
index 992c11a8220510e6a2d6d8521369d9e67b88a7f7..d2d0f4ef2a2bbbe0c3152ae0b8c54703ba46f694 100644
(file)
--- a/
lib/Support/raw_ostream.cpp
+++ b/
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';