[llvm] r300217 - Revert r300213 "[APSInt] Add a static_assert to ensure APSInt is packed well with APInt after r300171"
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 13 09:54:25 PDT 2017
Author: ctopper
Date: Thu Apr 13 11:54:25 2017
New Revision: 300217
URL: http://llvm.org/viewvc/llvm-project?rev=300217&view=rev
Log:
Revert r300213 "[APSInt] Add a static_assert to ensure APSInt is packed well with APInt after r300171"
MSVC doesn't pack derived classes the same way clang/gcc do.
Modified:
llvm/trunk/include/llvm/ADT/APSInt.h
Modified: llvm/trunk/include/llvm/ADT/APSInt.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APSInt.h?rev=300217&r1=300216&r2=300217&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/APSInt.h (original)
+++ llvm/trunk/include/llvm/ADT/APSInt.h Thu Apr 13 11:54:25 2017
@@ -24,9 +24,7 @@ class LLVM_NODISCARD APSInt : public API
public:
/// Default constructor that creates an uninitialized APInt.
- explicit APSInt() : IsUnsigned(false) {
- static_assert(sizeof(*this) == 16, "APSInt fields poorly packed");
- }
+ explicit APSInt() : IsUnsigned(false) {}
/// APSInt ctor - Create an APSInt with the specified width, default to
/// unsigned.
More information about the llvm-commits
mailing list