diff options
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Type.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 5188e5f..566bb28 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -832,6 +832,9 @@ FunctionValType FunctionValType::get(const FunctionType *FT) { return FunctionValType(FT->getReturnType(), ParamTypes, FT->isVarArg()); } +FunctionType *FunctionType::get(const Type *Result, bool isVarArg) { + return get(Result, ArrayRef<const Type *>(), isVarArg); +} // FunctionType::get - The factory function for the FunctionType class... FunctionType *FunctionType::get(const Type *ReturnType, @@ -908,9 +911,14 @@ bool VectorType::isValidElementType(const Type *ElemTy) { } //===----------------------------------------------------------------------===// -// Struct Type Factory... +// Struct Type Factory. // +StructType *StructType::get(LLVMContext &Context, bool isPacked) { + return get(Context, llvm::ArrayRef<const Type*>(), isPacked); +} + + StructType *StructType::get(LLVMContext &Context, ArrayRef<const Type*> ETypes, bool isPacked) { |