[llvm] r239907 - Tweak wording of alignment static_assert messages.

James Y Knight jyknight at google.com
Wed Jun 17 06:53:13 PDT 2015


Author: jyknight
Date: Wed Jun 17 08:53:12 2015
New Revision: 239907

URL: http://llvm.org/viewvc/llvm-project?rev=239907&view=rev
Log:
Tweak wording of alignment static_assert messages.

Modified:
    llvm/trunk/include/llvm/IR/User.h
    llvm/trunk/lib/IR/AttributeImpl.h
    llvm/trunk/lib/IR/Metadata.cpp
    llvm/trunk/lib/IR/User.cpp

Modified: llvm/trunk/include/llvm/IR/User.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/User.h?rev=239907&r1=239906&r2=239907&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/User.h (original)
+++ llvm/trunk/include/llvm/IR/User.h Wed Jun 17 08:53:12 2015
@@ -229,9 +229,9 @@ public:
 };
 // Either Use objects, or a Use pointer can be prepended to User.
 static_assert(AlignOf<Use>::Alignment >= AlignOf<User>::Alignment,
-              "Alignment sufficient after objects prepended to User");
+              "Alignment is insufficient after objects prepended to User");
 static_assert(AlignOf<Use *>::Alignment >= AlignOf<User>::Alignment,
-              "Alignment sufficient after objects prepended to User");
+              "Alignment is insufficient after objects prepended to User");
 
 template<> struct simplify_type<User::op_iterator> {
   typedef Value* SimpleType;

Modified: llvm/trunk/lib/IR/AttributeImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AttributeImpl.h?rev=239907&r1=239906&r2=239907&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AttributeImpl.h (original)
+++ llvm/trunk/lib/IR/AttributeImpl.h Wed Jun 17 08:53:12 2015
@@ -181,9 +181,9 @@ public:
       AttrList[I].Profile(ID);
   }
 };
-static_assert(AlignOf<AttributeSetNode>::Alignment >=
-                  AlignOf<Attribute>::Alignment,
-              "Alignment sufficient for objects appended to AttributeSetNode");
+static_assert(
+    AlignOf<AttributeSetNode>::Alignment >= AlignOf<Attribute>::Alignment,
+    "Alignment is insufficient for objects appended to AttributeSetNode");
 
 //===----------------------------------------------------------------------===//
 /// \class
@@ -273,9 +273,10 @@ public:
 
   void dump() const;
 };
-static_assert(AlignOf<AttributeSetImpl>::Alignment >=
-                  AlignOf<AttributeSetImpl::IndexAttrPair>::Alignment,
-              "Alignment sufficient for objects appended to AttributeSetImpl");
+static_assert(
+    AlignOf<AttributeSetImpl>::Alignment >=
+        AlignOf<AttributeSetImpl::IndexAttrPair>::Alignment,
+    "Alignment is insufficient for objects appended to AttributeSetImpl");
 
 } // end llvm namespace
 

Modified: llvm/trunk/lib/IR/Metadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Metadata.cpp?rev=239907&r1=239906&r2=239907&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Metadata.cpp (original)
+++ llvm/trunk/lib/IR/Metadata.cpp Wed Jun 17 08:53:12 2015
@@ -384,9 +384,9 @@ StringRef MDString::getString() const {
 // Assert that the MDNode types will not be unaligned by the objects
 // prepended to them.
 #define HANDLE_MDNODE_LEAF(CLASS)                                              \
-  static_assert(llvm::AlignOf<uint64_t>::Alignment >=                          \
-                    llvm::AlignOf<CLASS>::Alignment,                           \
-                "Alignment sufficient after objects prepended to " #CLASS);
+  static_assert(                                                               \
+      llvm::AlignOf<uint64_t>::Alignment >= llvm::AlignOf<CLASS>::Alignment,   \
+      "Alignment is insufficient after objects prepended to " #CLASS);
 #include "llvm/IR/Metadata.def"
 
 void *MDNode::operator new(size_t Size, unsigned NumOps) {

Modified: llvm/trunk/lib/IR/User.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/User.cpp?rev=239907&r1=239906&r2=239907&view=diff
==============================================================================
--- llvm/trunk/lib/IR/User.cpp (original)
+++ llvm/trunk/lib/IR/User.cpp Wed Jun 17 08:53:12 2015
@@ -44,9 +44,10 @@ void User::allocHungoffUses(unsigned N,
   assert(HasHungOffUses && "alloc must have hung off uses");
 
   static_assert(AlignOf<Use>::Alignment >= AlignOf<Use::UserRef>::Alignment,
-                "Alignment sufficient for hung-off-uses pieces");
-  static_assert(AlignOf<Use::UserRef>::Alignment >= AlignOf<BasicBlock *>::Alignment,
-                "Alignment sufficient for hung-off-uses pieces");
+                "Alignment is insufficient for 'hung-off-uses' pieces");
+  static_assert(AlignOf<Use::UserRef>::Alignment >=
+                    AlignOf<BasicBlock *>::Alignment,
+                "Alignment is insufficient for 'hung-off-uses' pieces");
 
   // Allocate the array of Uses, followed by a pointer (with bottom bit set) to
   // the User.





More information about the llvm-commits mailing list