diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-30 03:47:15 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-30 03:47:15 +0000 |
commit | 1d7126de19c175ddf9ff0d18671a70d7a44127ab (patch) | |
tree | e86f0c3785829879dde86657f0639df9504ad31a /lib/Support | |
parent | a89b3b3e15fce275ca9080dbe77c51034b4aedbc (diff) | |
download | external_llvm-1d7126de19c175ddf9ff0d18671a70d7a44127ab.zip external_llvm-1d7126de19c175ddf9ff0d18671a70d7a44127ab.tar.gz external_llvm-1d7126de19c175ddf9ff0d18671a70d7a44127ab.tar.bz2 |
Twine: Provide [u]int{32,64} conversions via implicit constructors instead of
explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77576 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/Twine.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/Support/Twine.cpp b/lib/Support/Twine.cpp index c9e5f24..2b0cf06 100644 --- a/lib/Support/Twine.cpp +++ b/lib/Support/Twine.cpp @@ -47,10 +47,16 @@ void Twine::printOneChild(raw_ostream &OS, const void *Ptr, case Twine::StringRefKind: OS << *static_cast<const StringRef*>(Ptr); break; - case Twine::UDecKind: + case Twine::UDec32Kind: + OS << *static_cast<const uint32_t*>(Ptr); + break; + case Twine::SDec32Kind: + OS << *static_cast<const int32_t*>(Ptr); + break; + case Twine::UDec64Kind: OS << *static_cast<const uint64_t*>(Ptr); break; - case Twine::SDecKind: + case Twine::SDec64Kind: OS << *static_cast<const int64_t*>(Ptr); break; case Twine::UHexKind: @@ -83,11 +89,17 @@ void Twine::printOneChildRepr(raw_ostream &OS, const void *Ptr, OS << "stringref:\"" << static_cast<const StringRef*>(Ptr) << "\""; break; - case Twine::UDecKind: - OS << "udec:" << static_cast<const uint64_t*>(Ptr) << "\""; + case Twine::UDec32Kind: + OS << "udec32:" << static_cast<const uint64_t*>(Ptr) << "\""; + break; + case Twine::SDec32Kind: + OS << "sdec32:" << static_cast<const int64_t*>(Ptr) << "\""; + break; + case Twine::UDec64Kind: + OS << "udec64:" << static_cast<const uint64_t*>(Ptr) << "\""; break; - case Twine::SDecKind: - OS << "sdec:" << static_cast<const int64_t*>(Ptr) << "\""; + case Twine::SDec64Kind: + OS << "sdec64:" << static_cast<const int64_t*>(Ptr) << "\""; break; case Twine::UHexKind: OS << "uhex:" << static_cast<const uint64_t*>(Ptr) << "\""; |