summaryrefslogtreecommitdiff
path: root/lib/VMCore/Type.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-06-16 21:37:15 +0000
committerChris Lattner <sabre@nondot.org>2011-06-16 21:37:15 +0000
commit1d0a815ee4b994d658125fe30e81160459c46d4a (patch)
tree0df4df48434d28a709705c23d763c4d3ffbc57f9 /lib/VMCore/Type.cpp
parente817127e0a413bd934546b7d9b79a2b589c180b3 (diff)
downloadllvm-1d0a815ee4b994d658125fe30e81160459c46d4a.tar.gz
llvm-1d0a815ee4b994d658125fe30e81160459c46d4a.tar.bz2
llvm-1d0a815ee4b994d658125fe30e81160459c46d4a.tar.xz
change Type.h to forward declare ArrayRef instead of #including it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Type.cpp')
-rw-r--r--lib/VMCore/Type.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index 5188e5f0f8..566bb28c4a 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) {