[llvm-commits] [llvm] r74702 - in /llvm/trunk: include/llvm/LLVMContext.h lib/VMCore/LLVMContext.cpp

Owen Anderson resistor at mac.com
Thu Jul 2 09:51:52 PDT 2009


Author: resistor
Date: Thu Jul  2 11:51:51 2009
New Revision: 74702

URL: http://llvm.org/viewvc/llvm-project?rev=74702&view=rev
Log:
Add accessor for getting UndefValue's.

Modified:
    llvm/trunk/include/llvm/LLVMContext.h
    llvm/trunk/lib/VMCore/LLVMContext.cpp

Modified: llvm/trunk/include/llvm/LLVMContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LLVMContext.h?rev=74702&r1=74701&r2=74702&view=diff

==============================================================================
--- llvm/trunk/include/llvm/LLVMContext.h (original)
+++ llvm/trunk/include/llvm/LLVMContext.h Thu Jul  2 11:51:51 2009
@@ -30,6 +30,7 @@
 class ConstantArray;
 class ConstantFP;
 class ConstantVector;
+class UndefValue;
 class IntegerType;
 class PointerType;
 class StructType;
@@ -57,6 +58,9 @@
   Constant* getNullValue(const Type* Ty);
   Constant* getAllOnesValue(const Type* Ty);
   
+  // UndefValue accessors
+  UndefValue* getUndef(const Type* Ty);
+  
   // ConstantInt accessors
   ConstantInt* getConstantIntTrue();
   ConstantInt* getConstantIntFalse();

Modified: llvm/trunk/lib/VMCore/LLVMContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContext.cpp?rev=74702&r1=74701&r2=74702&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/LLVMContext.cpp (original)
+++ llvm/trunk/lib/VMCore/LLVMContext.cpp Thu Jul  2 11:51:51 2009
@@ -38,6 +38,11 @@
   return Constant::getAllOnesValue(Ty);
 }
 
+// UndefValue accessors.
+UndefValue* LLVMContext::getUndef(const Type* Ty) {
+  return UndefValue::get(Ty);
+}
+
 // ConstantInt accessors.
 ConstantInt* LLVMContext::getConstantIntTrue() {
   return ConstantInt::getTrue();





More information about the llvm-commits mailing list