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

Owen Anderson resistor at mac.com
Wed Jul 1 16:56:46 PDT 2009


Author: resistor
Date: Wed Jul  1 18:56:45 2009
New Revision: 74670

URL: http://llvm.org/viewvc/llvm-project?rev=74670&view=rev
Log:
Add a few methods that got left out earlier.

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=74670&r1=74669&r2=74670&view=diff

==============================================================================
--- llvm/trunk/include/llvm/LLVMContext.h (original)
+++ llvm/trunk/include/llvm/LLVMContext.h Wed Jul  1 18:56:45 2009
@@ -53,6 +53,10 @@
   LLVMContext();
   ~LLVMContext();
   
+  // Constant accessors
+  Constant* getNullValue(const Type* Ty);
+  Constant* getAllOnesValue(const Type* Ty);
+  
   // ConstantInt accessors
   ConstantInt* getConstantIntTrue();
   ConstantInt* getConstantIntFalse();
@@ -180,6 +184,7 @@
   OpaqueType* getOpaqueType();
   
   // StructType accessors
+  StructType* getStructType(bool isPacked=false);
   StructType* getStructType(const std::vector<const Type*>& Params,
                             bool isPacked = false);
   
@@ -188,7 +193,7 @@
   
   // PointerType accessors
   PointerType* getPointerType(const Type* ElementType, unsigned AddressSpace);
-  PointerType* getPointerTypeUnqualified(const Type* ElementType);
+  PointerType* getPointerTypeUnqual(const Type* ElementType);
   
   // VectorType accessors
   VectorType* getVectorType(const Type* ElementType, unsigned NumElements);

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

==============================================================================
--- llvm/trunk/lib/VMCore/LLVMContext.cpp (original)
+++ llvm/trunk/lib/VMCore/LLVMContext.cpp Wed Jul  1 18:56:45 2009
@@ -29,6 +29,15 @@
 LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl()) { }
 LLVMContext::~LLVMContext() { delete pImpl; }
 
+// Constant accessors
+Constant* LLVMContext::getNullValue(const Type* Ty) {
+  return Constant::getNullValue(Ty);
+}
+
+Constant* LLVMContext::getAllOnesValue(const Type* Ty) {
+  return Constant::getAllOnesValue(Ty);
+}
+
 // ConstantInt accessors.
 ConstantInt* LLVMContext::getConstantIntTrue() {
   return ConstantInt::getTrue();
@@ -409,6 +418,10 @@
 }
 
 // StructType accessors
+StructType* LLVMContext::getStructType(bool isPacked) {
+  return StructType::get(isPacked);
+}
+
 StructType* LLVMContext::getStructType(const std::vector<const Type*>& Params,
                                        bool isPacked) {
   return StructType::get(Params, isPacked);
@@ -426,7 +439,7 @@
   return PointerType::get(ElementType, AddressSpace);
 }
 
-PointerType* LLVMContext::getPointerTypeUnqualified(const Type* ElementType) {
+PointerType* LLVMContext::getPointerTypeUnqual(const Type* ElementType) {
   return PointerType::getUnqual(ElementType);
 }
   





More information about the llvm-commits mailing list