Altered ctor for APSInt to accept an optional "isUnsigned" flag. Default
authorTed Kremenek <kremenek@apple.com>
Tue, 29 Jan 2008 18:55:14 +0000 (18:55 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 29 Jan 2008 18:55:14 +0000 (18:55 +0000)
behavior is unchanged.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46521 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/APSInt.h

index d08714fda24910cdff7ed114634d530cf7c4401f..be419272fec8746316949abd4a680e51cfc589ac 100644 (file)
@@ -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) {}