From 9f7c0657d25d60b9da8aafdf8b23159453a7dfb0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 16 Jun 2011 21:37:15 +0000 Subject: change Type.h to forward declare ArrayRef instead of #including it. llvm-svn: 133197 --- llvm/lib/VMCore/Type.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'llvm/lib/VMCore') diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp index 5188e5f0f83..566bb28c4a4 100644 --- a/llvm/lib/VMCore/Type.cpp +++ b/llvm/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(), 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(), isPacked); +} + + StructType *StructType::get(LLVMContext &Context, ArrayRef ETypes, bool isPacked) { -- cgit v1.2.3