[AST] Compress the FixedPointSemantics type better.
authorBevin Hansson <bevin.hansson@ericsson.com>
Thu, 23 Jan 2020 08:16:31 +0000 (09:16 +0100)
committerBevin Hansson <bevin.hansson@ericsson.com>
Wed, 8 Apr 2020 12:33:04 +0000 (14:33 +0200)
Reviewers: rjmccall, leonardchan, bjope

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73257

clang/include/clang/Basic/FixedPoint.h

index fd8bae6..55465c6 100644 (file)
@@ -75,11 +75,11 @@ public:
   }
 
 private:
-  unsigned Width;
-  unsigned Scale;
-  bool IsSigned;
-  bool IsSaturated;
-  bool HasUnsignedPadding;
+  unsigned Width          : 16;
+  unsigned Scale          : 13;
+  unsigned IsSigned       : 1;
+  unsigned IsSaturated    : 1;
+  unsigned HasUnsignedPadding : 1;
 };
 
 /// The APFixedPoint class works similarly to APInt/APSInt in that it is a