llvm.org GIT mirror llvm / 9c0f53a
[APSInt] Add a static_assert to ensure APSInt is packed well with APInt after r300171. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300213 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 3 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
2323
2424 public:
2525 /// Default constructor that creates an uninitialized APInt.
26 explicit APSInt() : IsUnsigned(false) {}
26 explicit APSInt() : IsUnsigned(false) {
27 static_assert(sizeof(*this) == 16, "APSInt fields poorly packed");
28 }
2729
2830 /// APSInt ctor - Create an APSInt with the specified width, default to
2931 /// unsigned.