diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-04-06 20:28:34 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-04-06 20:28:34 +0000 |
commit | ec5d1800f9baecb69289b18baefe593960b0d555 (patch) | |
tree | 150e01601ec9a3d5cba54756136d004391c24469 /lib/VMCore/Type.cpp | |
parent | 70d4370b47cdd375bbea98e50452789fe4f1af04 (diff) | |
download | external_llvm-ec5d1800f9baecb69289b18baefe593960b0d555.zip external_llvm-ec5d1800f9baecb69289b18baefe593960b0d555.tar.gz external_llvm-ec5d1800f9baecb69289b18baefe593960b0d555.tar.bz2 |
Replace const std::vector& with ArrayRef in the type creation APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Type.cpp')
-rw-r--r-- | lib/VMCore/Type.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index be28ad1..b15304c 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -17,6 +17,7 @@ #include "llvm/Assembly/Writer.h" #include "llvm/LLVMContext.h" #include "llvm/Metadata.h" +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/SCCIterator.h" @@ -460,7 +461,7 @@ bool FunctionType::isValidArgumentType(const Type *ArgTy) { } FunctionType::FunctionType(const Type *Result, - const std::vector<const Type*> &Params, + ArrayRef<const Type*> Params, bool IsVarArgs) : DerivedType(Result->getContext(), FunctionTyID), isVarArgs(IsVarArgs) { ContainedTys = reinterpret_cast<PATypeHandle*>(this+1); @@ -483,7 +484,7 @@ FunctionType::FunctionType(const Type *Result, } StructType::StructType(LLVMContext &C, - const std::vector<const Type*> &Types, bool isPacked) + ArrayRef<const Type*> Types, bool isPacked) : CompositeType(C, StructTyID) { ContainedTys = reinterpret_cast<PATypeHandle*>(this + 1); NumContainedTys = Types.size(); @@ -838,7 +839,7 @@ FunctionValType FunctionValType::get(const FunctionType *FT) { // FunctionType::get - The factory function for the FunctionType class... FunctionType *FunctionType::get(const Type *ReturnType, - const std::vector<const Type*> &Params, + ArrayRef<const Type*> Params, bool isVarArg) { FunctionValType VT(ReturnType, Params, isVarArg); FunctionType *FT = 0; @@ -915,7 +916,7 @@ bool VectorType::isValidElementType(const Type *ElemTy) { // StructType *StructType::get(LLVMContext &Context, - const std::vector<const Type*> &ETypes, + ArrayRef<const Type*> ETypes, bool isPacked) { StructValType STV(ETypes, isPacked); StructType *ST = 0; |