aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-01-29 18:55:14 +0000
committerTed Kremenek <kremenek@apple.com>2008-01-29 18:55:14 +0000
commit58401bbcc01606be38e90387ad4c9f23ab021604 (patch)
tree1af2fdb0a0bc9e53e87fb885359ef387f74f99f3
parent301f405ef34539e7f287513bd7df0cbcf4f71d07 (diff)
downloadexternal_llvm-58401bbcc01606be38e90387ad4c9f23ab021604.zip
external_llvm-58401bbcc01606be38e90387ad4c9f23ab021604.tar.gz
external_llvm-58401bbcc01606be38e90387ad4c9f23ab021604.tar.bz2
Altered ctor for APSInt to accept an optional "isUnsigned" flag. Default
behavior is unchanged. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46521 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/APSInt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/ADT/APSInt.h b/include/llvm/ADT/APSInt.h
index d08714f..be41927 100644
--- a/include/llvm/ADT/APSInt.h
+++ b/include/llvm/ADT/APSInt.h
@@ -25,7 +25,8 @@ class APSInt : public APInt {
public:
/// APSInt ctor - Create an APSInt with the specified width, default to
/// unsigned.
- explicit APSInt(uint32_t BitWidth) : APInt(BitWidth, 0), IsUnsigned(true) {}
+ explicit APSInt(uint32_t BitWidth, bool isUnsigned = true)
+ : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {}
explicit APSInt(const APInt &I, bool isUnsigned = true)
: APInt(I), IsUnsigned(isUnsigned) {}