mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -31,7 +31,6 @@ class PointerValType;
|
||||
class VectorValType;
|
||||
class IntegerValType;
|
||||
class APInt;
|
||||
class ParamAttrsList;
|
||||
|
||||
class DerivedType : public Type {
|
||||
friend class Type;
|
||||
@@ -140,12 +139,11 @@ public:
|
||||
class FunctionType : public DerivedType {
|
||||
friend class TypeMap<FunctionValType, FunctionType>;
|
||||
bool isVarArgs;
|
||||
const ParamAttrsList *ParamAttrs;
|
||||
|
||||
FunctionType(const FunctionType &); // Do not implement
|
||||
const FunctionType &operator=(const FunctionType &); // Do not implement
|
||||
FunctionType(const Type *Result, const std::vector<const Type*> &Params,
|
||||
bool IsVarArgs, const ParamAttrsList *Attrs = 0);
|
||||
bool IsVarArgs);
|
||||
|
||||
public:
|
||||
/// FunctionType::get - This static method is the primary way of constructing
|
||||
@@ -154,12 +152,7 @@ public:
|
||||
static FunctionType *get(
|
||||
const Type *Result, ///< The result type
|
||||
const std::vector<const Type*> &Params, ///< The types of the parameters
|
||||
bool isVarArg, ///< Whether this is a variable argument length function
|
||||
const ParamAttrsList *Attrs = 0
|
||||
///< Indicates the parameter attributes to use, if any. The 0th entry
|
||||
///< in the list refers to the return type. Parameters are numbered
|
||||
///< starting at 1. This argument must be on the heap and FunctionType
|
||||
///< owns it after its passed here.
|
||||
bool isVarArg ///< Whether this is a variable argument length function
|
||||
);
|
||||
|
||||
inline bool isVarArg() const { return isVarArgs; }
|
||||
@@ -177,14 +170,6 @@ public:
|
||||
///
|
||||
unsigned getNumParams() const { return NumContainedTys - 1; }
|
||||
|
||||
bool isStructReturn() const;
|
||||
|
||||
/// The parameter attributes for the \p ith parameter are returned. The 0th
|
||||
/// parameter refers to the return type of the function.
|
||||
/// @returns The ParameterAttributes for the \p ith parameter.
|
||||
/// @brief Get the attributes for a parameter
|
||||
const ParamAttrsList *getParamAttrs() const { return ParamAttrs; }
|
||||
|
||||
// Implement the AbstractTypeUser interface.
|
||||
virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);
|
||||
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
||||
|
||||
Reference in New Issue
Block a user