From 90d557698a210085939930d21adf9ad3bf7fb86f Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 1 Jul 2009 23:56:45 +0000 Subject: Add a few methods that got left out earlier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74670 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/LLVMContext.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lib/VMCore') diff --git a/lib/VMCore/LLVMContext.cpp b/lib/VMCore/LLVMContext.cpp index 24df598..e30ad3f 100644 --- a/lib/VMCore/LLVMContext.cpp +++ b/lib/VMCore/LLVMContext.cpp @@ -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& 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); } -- cgit v1.1