Add new ctor for ConstPoolBool
authorChris Lattner <sabre@nondot.org>
Sat, 21 Jul 2001 19:16:08 +0000 (19:16 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 21 Jul 2001 19:16:08 +0000 (19:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/ConstantPool.cpp

index 53428da3909ab0d5b7a3d99478592f8e07511807..092ca61ff1dfa038c1a95ebb008ce596ac929c52 100644 (file)
@@ -217,6 +217,11 @@ ConstPoolBool::ConstPoolBool(bool V, const string &Name = "")
   : ConstPoolVal(Type::BoolTy, Name) {
   Val = V;
 }
+ConstPoolBool::ConstPoolBool(const Type *Ty, bool V, const string &Name = "") 
+  : ConstPoolVal(Type::BoolTy, Name) {
+  Val = V;
+  assert(Ty == Type::BoolTy && "BoolTy is only valid type for bool constant");
+}
 
 ConstPoolInt::ConstPoolInt(const Type *Ty, uint64_t V, const string &Name)
   : ConstPoolVal(Ty, Name) { Val.Unsigned = V; }