Assert invariants
authorChris Lattner <sabre@nondot.org>
Thu, 9 Feb 2006 02:25:42 +0000 (02:25 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 9 Feb 2006 02:25:42 +0000 (02:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26073 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineConstantPool.h

index 0d12984ad6fae4fe89dcb5bb055be3a7f8ef0def..2ac6e148b34b9d551fb11ed4bd40d57f69a8860e 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <vector>
 #include <iosfwd>
+#include <cassert>
 
 namespace llvm {
 
@@ -37,6 +38,8 @@ public:
   /// an existing one.  User must specify an alignment in bytes for the object.
   ///
   unsigned getConstantPoolIndex(Constant *C, unsigned Alignment) {
+    assert(Alignment && "Alignment must be specified!");
+    
     // Check to see if we already have this constant.
     //
     // FIXME, this could be made much more efficient for large constant pools.