[clang] d5d0d8e - [AST] Compress the FixedPointSemantics type better.

Bevin Hansson via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 8 05:42:19 PDT 2020


Author: Bevin Hansson
Date: 2020-04-08T14:33:04+02:00
New Revision: d5d0d8eb7d094f8270721662882c0094fc4fdc29

URL: https://github.com/llvm/llvm-project/commit/d5d0d8eb7d094f8270721662882c0094fc4fdc29
DIFF: https://github.com/llvm/llvm-project/commit/d5d0d8eb7d094f8270721662882c0094fc4fdc29.diff

LOG: [AST] Compress the FixedPointSemantics type better.

Reviewers: rjmccall, leonardchan, bjope

Subscribers: cfe-commits

Tags: #clang

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

Added: 
    

Modified: 
    clang/include/clang/Basic/FixedPoint.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/FixedPoint.h b/clang/include/clang/Basic/FixedPoint.h
index fd8bae62e228..55465c604a7d 100644
--- a/clang/include/clang/Basic/FixedPoint.h
+++ b/clang/include/clang/Basic/FixedPoint.h
@@ -75,11 +75,11 @@ class FixedPointSemantics {
   }
 
 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


        


More information about the cfe-commits mailing list