Add accessor for getting UndefValue's.
authorOwen Anderson <resistor@mac.com>
Thu, 2 Jul 2009 16:51:51 +0000 (16:51 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 2 Jul 2009 16:51:51 +0000 (16:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74702 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/LLVMContext.h
lib/VMCore/LLVMContext.cpp

index a338b1fce2ca3fd1c64cb5508393c31bdeee7300..877995203e912a991149ef006aeebe7d066cdbd8 100644 (file)
@@ -30,6 +30,7 @@ class ConstantAggregateZero;
 class ConstantArray;
 class ConstantFP;
 class ConstantVector;
+class UndefValue;
 class IntegerType;
 class PointerType;
 class StructType;
@@ -57,6 +58,9 @@ public:
   Constant* getNullValue(const Type* Ty);
   Constant* getAllOnesValue(const Type* Ty);
   
+  // UndefValue accessors
+  UndefValue* getUndef(const Type* Ty);
+  
   // ConstantInt accessors
   ConstantInt* getConstantIntTrue();
   ConstantInt* getConstantIntFalse();
index e30ad3f900461fdb1b7bcd63ecde3f70e333b218..1987463af301f7f3ebfcaf6a9c6282b66882bb6b 100644 (file)
@@ -38,6 +38,11 @@ Constant* LLVMContext::getAllOnesValue(const Type* Ty) {
   return Constant::getAllOnesValue(Ty);
 }
 
+// UndefValue accessors.
+UndefValue* LLVMContext::getUndef(const Type* Ty) {
+  return UndefValue::get(Ty);
+}
+
 // ConstantInt accessors.
 ConstantInt* LLVMContext::getConstantIntTrue() {
   return ConstantInt::getTrue();