aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-03-04 18:57:05 +0000
committerDevang Patel <dpatel@apple.com>2008-03-04 18:57:05 +0000
commit52f8ed8368890467ca807605a17afae81dc152fb (patch)
tree2e5aa335dce3cc8a54a8f5d4052dd9197feaf9ce /include
parentdf1d15c52ebdb3fa6826d56dda231952f495b30f (diff)
downloadexternal_llvm-52f8ed8368890467ca807605a17afae81dc152fb.zip
external_llvm-52f8ed8368890467ca807605a17afae81dc152fb.tar.gz
external_llvm-52f8ed8368890467ca807605a17afae81dc152fb.tar.bz2
Add FunctionType ctor variant that takes SmallVector params.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/DerivedTypes.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h
index 457d37d..b8378ac 100644
--- a/include/llvm/DerivedTypes.h
+++ b/include/llvm/DerivedTypes.h
@@ -19,6 +19,7 @@
#define LLVM_DERIVED_TYPES_H
#include "llvm/Type.h"
+#include "llvm/ADT/SmallVector.h"
namespace llvm {
@@ -144,6 +145,8 @@ class FunctionType : public DerivedType {
const FunctionType &operator=(const FunctionType &); // Do not implement
FunctionType(const Type *Result, const std::vector<const Type*> &Params,
bool IsVarArgs);
+ FunctionType(const Type *Result, const SmallVectorImpl<const Type*> &Params,
+ bool IsVarArgs);
public:
/// FunctionType::get - This static method is the primary way of constructing
@@ -155,6 +158,12 @@ public:
bool isVarArg ///< Whether this is a variable argument length function
);
+ static FunctionType *get(
+ const Type *Result, ///< The result type
+ const SmallVectorImpl<const Type*> &Params, ///< The types of the parameters
+ bool isVarArg ///< Whether this is a variable argument length function
+ );
+
inline bool isVarArg() const { return isVarArgs; }
inline const Type *getReturnType() const { return ContainedTys[0]; }