aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineConstantPool.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-09 02:25:42 +0000
committerChris Lattner <sabre@nondot.org>2006-02-09 02:25:42 +0000
commite7a1e2152cf5dadf98bf78f9b0337213271b8786 (patch)
treec42f410c903ab01f8731aed401f1e75c5dcfa1c8 /include/llvm/CodeGen/MachineConstantPool.h
parentc1f523dedd7d90c02179184c55e837a9f5b8d73b (diff)
downloadexternal_llvm-e7a1e2152cf5dadf98bf78f9b0337213271b8786.zip
external_llvm-e7a1e2152cf5dadf98bf78f9b0337213271b8786.tar.gz
external_llvm-e7a1e2152cf5dadf98bf78f9b0337213271b8786.tar.bz2
Assert invariants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineConstantPool.h')
-rw-r--r--include/llvm/CodeGen/MachineConstantPool.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h
index 0d12984..2ac6e14 100644
--- a/include/llvm/CodeGen/MachineConstantPool.h
+++ b/include/llvm/CodeGen/MachineConstantPool.h
@@ -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.