summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/APSInt.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-23 05:15:32 +0000
committerChris Lattner <sabre@nondot.org>2007-08-23 05:15:32 +0000
commit9132a2b81842b0e2b77703fab3e6fe7467f859bb (patch)
treeb31a8cddd0f652d3bc2e363a542dfc0b69067ea6 /include/llvm/ADT/APSInt.h
parentc00c2baf481b9dffe9288f5dad0f5ec9687e1347 (diff)
downloadllvm-9132a2b81842b0e2b77703fab3e6fe7467f859bb.tar.gz
llvm-9132a2b81842b0e2b77703fab3e6fe7467f859bb.tar.bz2
llvm-9132a2b81842b0e2b77703fab3e6fe7467f859bb.tar.xz
rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()
Add an APSInt::toString() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/APSInt.h')
-rw-r--r--include/llvm/ADT/APSInt.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ADT/APSInt.h b/include/llvm/ADT/APSInt.h
index 7e515da704..91dd709000 100644
--- a/include/llvm/ADT/APSInt.h
+++ b/include/llvm/ADT/APSInt.h
@@ -52,6 +52,12 @@ public:
void setIsUnsigned(bool Val) { IsUnsigned = Val; }
void setIsSigned(bool Val) { IsUnsigned = !Val; }
+ /// This is used internally to convert an APInt to a string.
+ /// @brief Converts an APInt to a std::string
+ std::string toString(uint8_t Radix) const {
+ return toString(Radix, isSigned());
+ }
+
const APSInt &operator%=(const APSInt &RHS) {
assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");