summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-19 19:28:18 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-19 19:28:18 +0000
commit339d0cbdd13f0d6b5e6546a858ae6b8abcae2d0a (patch)
tree515cdd54ab6db65dbe984bf50bd264d04fb3d687
parent948f82b8e4cd9ef82e8ee2a8c181e69b9859008a (diff)
downloadbcm5719-llvm-339d0cbdd13f0d6b5e6546a858ae6b8abcae2d0a.tar.gz
bcm5719-llvm-339d0cbdd13f0d6b5e6546a858ae6b8abcae2d0a.zip
Remove SmallString::append_*int* methods; how many copies of int -> str
conversion code do we really need? - S.append_uint(N) can be replaced with 'raw_svector_ostream(S) << N' which is somewhat slower due to the extra set up cost, but still plenty fast (especially if the svector set up cost can be amortized). llvm-svn: 79450
-rw-r--r--llvm/include/llvm/ADT/SmallString.h41
1 files changed, 0 insertions, 41 deletions
diff --git a/llvm/include/llvm/ADT/SmallString.h b/llvm/include/llvm/ADT/SmallString.h
index bbc3c0526ad..7d3bff6685a 100644
--- a/llvm/include/llvm/ADT/SmallString.h
+++ b/llvm/include/llvm/ADT/SmallString.h
@@ -59,47 +59,6 @@ public:
this->push_back(C);
return *this;
}
-
- SmallString &append_uint_32(uint32_t N) {
- char Buffer[20];
- char *BufPtr = Buffer+20;
-
- if (N == 0) *--BufPtr = '0'; // Handle special case.
-
- while (N) {
- *--BufPtr = '0' + char(N % 10);
- N /= 10;
- }
- this->append(BufPtr, Buffer+20);
- return *this;
- }
-
- SmallString &append_uint(uint64_t N) {
- if (N == uint32_t(N))
- return append_uint_32(uint32_t(N));
-
- char Buffer[40];
- char *BufPtr = Buffer+40;
-
- if (N == 0) *--BufPtr = '0'; // Handle special case...
-
- while (N) {
- *--BufPtr = '0' + char(N % 10);
- N /= 10;
- }
-
- this->append(BufPtr, Buffer+40);
- return *this;
- }
-
- SmallString &append_sint(int64_t N) {
- if (N < 0) {
- this->push_back('-');
- N = -N;
- }
- return append_uint((uint64_t)N);
- }
-
};
OpenPOWER on IntegriCloud