mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
if functiontype is going to have a pointer to a paramattr object, it better
be const. The only way to get a pointer to these returns a const pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36734 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e4b4394b2f
commit
645fc4edc2
@ -140,12 +140,12 @@ public:
|
|||||||
class FunctionType : public DerivedType {
|
class FunctionType : public DerivedType {
|
||||||
friend class TypeMap<FunctionValType, FunctionType>;
|
friend class TypeMap<FunctionValType, FunctionType>;
|
||||||
bool isVarArgs;
|
bool isVarArgs;
|
||||||
ParamAttrsList *ParamAttrs;
|
const ParamAttrsList *ParamAttrs;
|
||||||
|
|
||||||
FunctionType(const FunctionType &); // Do not implement
|
FunctionType(const FunctionType &); // Do not implement
|
||||||
const FunctionType &operator=(const FunctionType &); // Do not implement
|
const FunctionType &operator=(const FunctionType &); // Do not implement
|
||||||
FunctionType(const Type *Result, const std::vector<const Type*> &Params,
|
FunctionType(const Type *Result, const std::vector<const Type*> &Params,
|
||||||
bool IsVarArgs, ParamAttrsList *Attrs = 0);
|
bool IsVarArgs, const ParamAttrsList *Attrs = 0);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// FunctionType::get - This static method is the primary way of constructing
|
/// FunctionType::get - This static method is the primary way of constructing
|
||||||
@ -155,7 +155,7 @@ public:
|
|||||||
const Type *Result, ///< The result type
|
const Type *Result, ///< The result type
|
||||||
const std::vector<const Type*> &Params, ///< The types of the parameters
|
const std::vector<const Type*> &Params, ///< The types of the parameters
|
||||||
bool isVarArg, ///< Whether this is a variable argument length function
|
bool isVarArg, ///< Whether this is a variable argument length function
|
||||||
ParamAttrsList *Attrs = 0
|
const ParamAttrsList *Attrs = 0
|
||||||
///< Indicates the parameter attributes to use, if any. The 0th entry
|
///< Indicates the parameter attributes to use, if any. The 0th entry
|
||||||
///< in the list refers to the return type. Parameters are numbered
|
///< in the list refers to the return type. Parameters are numbered
|
||||||
///< starting at 1. This argument must be on the heap and FunctionType
|
///< starting at 1. This argument must be on the heap and FunctionType
|
||||||
|
@ -417,7 +417,7 @@ const IntegerType *Type::Int64Ty = new BuiltinIntegerType(64);
|
|||||||
|
|
||||||
FunctionType::FunctionType(const Type *Result,
|
FunctionType::FunctionType(const Type *Result,
|
||||||
const std::vector<const Type*> &Params,
|
const std::vector<const Type*> &Params,
|
||||||
bool IsVarArgs, ParamAttrsList *Attrs)
|
bool IsVarArgs, const ParamAttrsList *Attrs)
|
||||||
: DerivedType(FunctionTyID), isVarArgs(IsVarArgs), ParamAttrs(Attrs) {
|
: DerivedType(FunctionTyID), isVarArgs(IsVarArgs), ParamAttrs(Attrs) {
|
||||||
ContainedTys = reinterpret_cast<PATypeHandle*>(this+1);
|
ContainedTys = reinterpret_cast<PATypeHandle*>(this+1);
|
||||||
NumContainedTys = Params.size() + 1; // + 1 for result type
|
NumContainedTys = Params.size() + 1; // + 1 for result type
|
||||||
@ -1084,7 +1084,7 @@ FunctionValType FunctionValType::get(const FunctionType *FT) {
|
|||||||
FunctionType *FunctionType::get(const Type *ReturnType,
|
FunctionType *FunctionType::get(const Type *ReturnType,
|
||||||
const std::vector<const Type*> &Params,
|
const std::vector<const Type*> &Params,
|
||||||
bool isVarArg,
|
bool isVarArg,
|
||||||
ParamAttrsList *Attrs) {
|
const ParamAttrsList *Attrs) {
|
||||||
|
|
||||||
FunctionValType VT(ReturnType, Params, isVarArg, Attrs);
|
FunctionValType VT(ReturnType, Params, isVarArg, Attrs);
|
||||||
FunctionType *FT = FunctionTypes->get(VT);
|
FunctionType *FT = FunctionTypes->get(VT);
|
||||||
|
Loading…
Reference in New Issue
Block a user