mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Improve encapsulation in the FunctionType class, by adding param_(iterator/begin/end)
members, and eliminating the getParamTypes() method, and the associated typedef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11223 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bcb6afba33
commit
36cb08ae5b
@ -120,11 +120,10 @@ public:
|
||||
|
||||
|
||||
|
||||
struct FunctionType : public DerivedType {
|
||||
typedef std::vector<PATypeHandle> ParamTypes;
|
||||
class FunctionType : public DerivedType {
|
||||
friend class TypeMap<FunctionValType, FunctionType>;
|
||||
private:
|
||||
PATypeHandle ResultType;
|
||||
typedef std::vector<PATypeHandle> ParamTypes;
|
||||
ParamTypes ParamTys;
|
||||
bool isVarArgs;
|
||||
|
||||
@ -153,7 +152,10 @@ public:
|
||||
|
||||
inline bool isVarArg() const { return isVarArgs; }
|
||||
inline const Type *getReturnType() const { return ResultType; }
|
||||
inline const ParamTypes &getParamTypes() const { return ParamTys; }
|
||||
|
||||
typedef ParamTypes::const_iterator param_iterator;
|
||||
param_iterator param_begin() const { return ParamTys.begin(); }
|
||||
param_iterator param_end() const { return ParamTys.end(); }
|
||||
|
||||
// Parameter type accessors...
|
||||
const Type *getParamType(unsigned i) const { return ParamTys[i]; }
|
||||
|
Loading…
Reference in New Issue
Block a user