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 | e8b3236284f82c21c2c242ede018021e13db5530 (patch) | |
| tree | 260cf669f9fa0822c679fa55bf29d71d57bd9018 /llvm/lib/Support | |
| parent | fc2ed30ab8fcd75c52f89817fd95a1e03ad1d68b (diff) | |
| download | bcm5719-llvm-e8b3236284f82c21c2c242ede018021e13db5530.tar.gz bcm5719-llvm-e8b3236284f82c21c2c242ede018021e13db5530.zip | |
Twine: Provide [u]int{32,64} conversions via implicit constructors instead of
explicitly.
llvm-svn: 77576
Diffstat (limited to 'llvm/lib/Support')
| -rw-r--r-- | llvm/lib/Support/Twine.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/llvm/lib/Support/Twine.cpp b/llvm/lib/Support/Twine.cpp index c9e5f2401ec..2b0cf062ec8 100644 --- a/llvm/lib/Support/Twine.cpp +++ b/llvm/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) << "\""; |

