Add a few methods that got left out earlier.
authorOwen Anderson <resistor@mac.com>
Wed, 1 Jul 2009 23:56:45 +0000 (23:56 +0000)
committerOwen Anderson <resistor@mac.com>
Wed, 1 Jul 2009 23:56:45 +0000 (23:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74670 91177308-0d34-0410-b5e6-96231b3b80d8

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

index f018b7e428636abb3269492d0d365a6db4f866e2..a338b1fce2ca3fd1c64cb5508393c31bdeee7300 100644 (file)
@@ -53,6 +53,10 @@ public:
   LLVMContext();
   ~LLVMContext();
   
+  // Constant accessors
+  Constant* getNullValue(const Type* Ty);
+  Constant* getAllOnesValue(const Type* Ty);
+  
   // ConstantInt accessors
   ConstantInt* getConstantIntTrue();
   ConstantInt* getConstantIntFalse();
@@ -180,6 +184,7 @@ public:
   OpaqueType* getOpaqueType();
   
   // StructType accessors
+  StructType* getStructType(bool isPacked=false);
   StructType* getStructType(const std::vector<const Type*>& Params,
                             bool isPacked = false);
   
@@ -188,7 +193,7 @@ public:
   
   // 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);
index 24df598279bab71b0e20928a48e10f05dfaf95d0..e30ad3f900461fdb1b7bcd63ecde3f70e333b218 100644 (file)
@@ -29,6 +29,15 @@ LLVMContext& llvm::getGlobalContext() {
 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 @@ OpaqueType* LLVMContext::getOpaqueType() {
 }
 
 // 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 @@ PointerType* LLVMContext::getPointerType(const Type* ElementType,
   return PointerType::get(ElementType, AddressSpace);
 }
 
-PointerType* LLVMContext::getPointerTypeUnqualified(const Type* ElementType) {
+PointerType* LLVMContext::getPointerTypeUnqual(const Type* ElementType) {
   return PointerType::getUnqual(ElementType);
 }