diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-30 21:15:14 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-30 21:15:14 +0000 |
commit | 2d8bc0fe70c55664b89605dbfa5c2f591446469c (patch) | |
tree | 421514c2c7b5621c693bd9241d4563a8103fedd7 /lib/Support/Twine.cpp | |
parent | b5b56ba9d4df47e618d4e0f9e1e09bf216733ee8 (diff) |
Twine: Directly support int, long, and long long types.
- This should resolve Cygwin gcc ambiguities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Twine.cpp')
-rw-r--r-- | lib/Support/Twine.cpp | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/lib/Support/Twine.cpp b/lib/Support/Twine.cpp index 83a3a6180f..8b8c0f0db8 100644 --- a/lib/Support/Twine.cpp +++ b/lib/Support/Twine.cpp @@ -47,17 +47,23 @@ void Twine::printOneChild(raw_ostream &OS, const void *Ptr, case Twine::StringRefKind: OS << *static_cast<const StringRef*>(Ptr); break; - case Twine::UDec32Kind: - OS << *static_cast<const uint32_t*>(Ptr); + case Twine::DecUIKind: + OS << *static_cast<const unsigned int*>(Ptr); break; - case Twine::SDec32Kind: - OS << *static_cast<const int32_t*>(Ptr); + case Twine::DecIKind: + OS << *static_cast<const int*>(Ptr); break; - case Twine::UDec64Kind: - OS << *static_cast<const uint64_t*>(Ptr); + case Twine::DecULKind: + OS << *static_cast<const unsigned long*>(Ptr); break; - case Twine::SDec64Kind: - OS << *static_cast<const int64_t*>(Ptr); + case Twine::DecLKind: + OS << *static_cast<const long*>(Ptr); + break; + case Twine::DecULLKind: + OS << *static_cast<const unsigned long long*>(Ptr); + break; + case Twine::DecLLKind: + OS << *static_cast<const long long*>(Ptr); break; case Twine::UHexKind: OS.write_hex(*static_cast<const uint64_t*>(Ptr)); @@ -88,20 +94,26 @@ void Twine::printOneChildRepr(raw_ostream &OS, const void *Ptr, OS << "stringref:\"" << static_cast<const StringRef*>(Ptr) << "\""; break; - case Twine::UDec32Kind: - OS << "udec32:" << static_cast<const uint64_t*>(Ptr) << "\""; + case Twine::DecUIKind: + OS << "decUI:\"" << *static_cast<const unsigned int*>(Ptr) << "\""; + break; + case Twine::DecIKind: + OS << "decI:\"" << *static_cast<const int*>(Ptr) << "\""; + break; + case Twine::DecULKind: + OS << "decUL:\"" << *static_cast<const unsigned long*>(Ptr) << "\""; break; - case Twine::SDec32Kind: - OS << "sdec32:" << static_cast<const int64_t*>(Ptr) << "\""; + case Twine::DecLKind: + OS << "decL:\"" << *static_cast<const long*>(Ptr) << "\""; break; - case Twine::UDec64Kind: - OS << "udec64:" << static_cast<const uint64_t*>(Ptr) << "\""; + case Twine::DecULLKind: + OS << "decULL:\"" << *static_cast<const unsigned long long*>(Ptr) << "\""; break; - case Twine::SDec64Kind: - OS << "sdec64:" << static_cast<const int64_t*>(Ptr) << "\""; + case Twine::DecLLKind: + OS << "decLL:\"" << *static_cast<const long long*>(Ptr) << "\""; break; case Twine::UHexKind: - OS << "uhex:" << static_cast<const uint64_t*>(Ptr) << "\""; + OS << "uhex:\"" << static_cast<const uint64_t*>(Ptr) << "\""; break; } } |