summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit31cfda76cdd463e041c0fd235b45cb44be9f1819 (patch)
tree0a5abb2e608265e74bc222dba4708327062b4296 /llvm
parentf89ca383d760e33cdb7036de54236670b5697c2b (diff)
downloadbcm5719-llvm-31cfda76cdd463e041c0fd235b45cb44be9f1819.tar.gz
bcm5719-llvm-31cfda76cdd463e041c0fd235b45cb44be9f1819.zip
Altered ctor for APSInt to accept an optional "isUnsigned" flag. Default
behavior is unchanged. llvm-svn: 46521
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ADT/APSInt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/ADT/APSInt.h b/llvm/include/llvm/ADT/APSInt.h
index d08714fda24..be419272fec 100644
--- a/llvm/include/llvm/ADT/APSInt.h
+++ b/llvm/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) {}
OpenPOWER on IntegriCloud