diff options
author | Owen Anderson <resistor@mac.com> | 2009-06-30 17:50:28 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-06-30 17:50:28 +0000 |
commit | 72bf4473a6ca3809dd1f97a15b00f70b56358213 (patch) | |
tree | a04bada03b42a39d85dbc864ad456a1b85b49fcc /include/llvm | |
parent | 2c6f9f7227897e0487917f454200a9d167bcda2f (diff) |
Add wrappers for type construction to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74542 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/LLVMContext.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h index 398fae26dd..01c64a81e0 100644 --- a/include/llvm/LLVMContext.h +++ b/include/llvm/LLVMContext.h @@ -35,6 +35,8 @@ class PointerType; class StructType; class ArrayType; class VectorType; +class OpaqueType; +class FunctionType; class Type; class APInt; class APFloat; @@ -165,6 +167,34 @@ public: Constant* getConstantVector(const std::vector<Constant*>& V); Constant* getConstantVector(Constant* const* Vals, unsigned NumVals); ConstantVector* getConstantVectorAllOnes(const VectorType* Ty); + + // FunctionType accessors + FunctionType* getFunctionType(const Type* Result, + const std::vector<const Type*>& Params, + bool isVarArg); + + // IntegerType accessors + const IntegerType* getIntegerType(unsigned NumBits); + + // OpaqueType accessors + OpaqueType* getOpaqueType(); + + // StructType accessors + StructType* getStructType(const std::vector<const Type*>& Params, + bool isPacked = false); + + // ArrayType accessors + ArrayType* getArrayType(const Type* ElementType, uint64_t NumElements); + + // PointerType accessors + PointerType* getPointerType(const Type* ElementType, unsigned AddressSpace); + PointerType* getPointerTypeUnqualified(const Type* ElementType); + + // VectorType accessors + VectorType* getVectorType(const Type* ElementType, unsigned NumElements); + VectorType* getVectorTypeInteger(const VectorType* VTy); + VectorType* getVectorTypeExtendedElement(const VectorType* VTy); + VectorType* getVectorTypeTruncatedElement(const VectorType* VTy); }; } |