diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Argument.h | 6 | ||||
-rw-r--r-- | include/llvm/Attributes.h (renamed from include/llvm/ParameterAttributes.h) | 29 | ||||
-rw-r--r-- | include/llvm/Function.h | 12 | ||||
-rw-r--r-- | include/llvm/Instructions.h | 12 | ||||
-rw-r--r-- | include/llvm/Support/CallSite.h | 4 |
5 files changed, 31 insertions, 32 deletions
diff --git a/include/llvm/Argument.h b/include/llvm/Argument.h index ce81a94..0ad5431 100644 --- a/include/llvm/Argument.h +++ b/include/llvm/Argument.h @@ -15,7 +15,7 @@ #define LLVM_ARGUMENT_H #include "llvm/Value.h" -#include "llvm/ParameterAttributes.h" +#include "llvm/Attributes.h" #include "llvm/ADT/ilist_node.h" namespace llvm { @@ -61,10 +61,10 @@ public: bool hasStructRetAttr() const; /// addAttr - Add a ParamAttr to an argument - void addAttr(ParameterAttributes); + void addAttr(Attributes); /// removeAttr - Remove a ParamAttr from an argument - void removeAttr(ParameterAttributes); + void removeAttr(Attributes); /// classof - Methods for support type inquiry through isa, cast, and /// dyn_cast: diff --git a/include/llvm/ParameterAttributes.h b/include/llvm/Attributes.h index 848bb50..cdd810b 100644 --- a/include/llvm/ParameterAttributes.h +++ b/include/llvm/Attributes.h @@ -1,4 +1,4 @@ -//===-- llvm/ParameterAttributes.h - Container for ParamAttrs ---*- C++ -*-===// +//===-- llvm/Attributes.h - Container for ParamAttrs ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -20,8 +20,8 @@ namespace llvm { class Type; -/// ParameterAttributes - A bitset of attributes for a parameter. -typedef unsigned ParameterAttributes; +/// Attributes - A bitset of attributes for a parameter. +typedef unsigned Attributes; namespace ParamAttr { @@ -30,7 +30,6 @@ namespace ParamAttr { /// lists the attributes that can be associated with parameters or function /// results. /// @brief Function parameter attributes. -typedef ParameterAttributes Attributes; const Attributes None = 0; ///< No attributes have been set const Attributes ZExt = 1<<0; ///< Zero extended before/after call @@ -74,26 +73,26 @@ const Attributes MutuallyIncompatible[3] = { Attributes typeIncompatible(const Type *Ty); /// This turns an int alignment (a power of 2, normally) into the -/// form used internally in ParameterAttributes. -inline ParamAttr::Attributes constructAlignmentFromInt(unsigned i) { +/// form used internally in Attributes. +inline Attributes constructAlignmentFromInt(unsigned i) { return (i << 16); } -/// The set of ParameterAttributes set in Attributes is converted to a +/// The set of Attributes set in Attributes is converted to a /// string of equivalent mnemonics. This is, presumably, for writing out /// the mnemonics for the assembly writer. /// @brief Convert parameter attribute bits to text -std::string getAsString(ParameterAttributes Attrs); +std::string getAsString(Attributes Attrs); } // end namespace ParamAttr /// This is just a pair of values to associate a set of parameter attributes /// with a parameter index. struct ParamAttrsWithIndex { - ParameterAttributes Attrs; ///< The attributes that are set, or'd together. + Attributes Attrs; ///< The attributes that are set, or'd together. unsigned Index; ///< Index of the parameter for which the attributes apply. - static ParamAttrsWithIndex get(unsigned Idx, ParameterAttributes Attrs) { + static ParamAttrsWithIndex get(unsigned Idx, Attributes Attrs) { ParamAttrsWithIndex P; P.Index = Idx; P.Attrs = Attrs; @@ -137,12 +136,12 @@ public: /// addAttr - Add the specified attribute at the specified index to this /// attribute list. Since parameter attribute lists are immutable, this /// returns the new list. - PAListPtr addAttr(unsigned Idx, ParameterAttributes Attrs) const; + PAListPtr addAttr(unsigned Idx, Attributes Attrs) const; /// removeAttr - Remove the specified attribute at the specified index from /// this attribute list. Since parameter attribute lists are immutable, this /// returns the new list. - PAListPtr removeAttr(unsigned Idx, ParameterAttributes Attrs) const; + PAListPtr removeAttr(unsigned Idx, Attributes Attrs) const; //===--------------------------------------------------------------------===// // Parameter Attribute List Accessors @@ -150,11 +149,11 @@ public: /// getParamAttrs - The parameter attributes for the specified parameter are /// returned. Parameters for the result are denoted with Idx = 0. - ParameterAttributes getParamAttrs(unsigned Idx) const; + Attributes getParamAttrs(unsigned Idx) const; /// paramHasAttr - Return true if the specified parameter index has the /// specified attribute set. - bool paramHasAttr(unsigned Idx, ParameterAttributes Attr) const { + bool paramHasAttr(unsigned Idx, Attributes Attr) const { return getParamAttrs(Idx) & Attr; } @@ -166,7 +165,7 @@ public: /// hasAttrSomewhere - Return true if the specified attribute is set for at /// least one parameter or for the return value. - bool hasAttrSomewhere(ParameterAttributes Attr) const; + bool hasAttrSomewhere(Attributes Attr) const; /// operator==/!= - Provide equality predicates. bool operator==(const PAListPtr &RHS) const { return PAList == RHS.PAList; } diff --git a/include/llvm/Function.h b/include/llvm/Function.h index fea9e0f..3efce3b 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -22,7 +22,7 @@ #include "llvm/BasicBlock.h" #include "llvm/Argument.h" #include "llvm/Support/Annotation.h" -#include "llvm/ParameterAttributes.h" +#include "llvm/Attributes.h" namespace llvm { @@ -150,14 +150,14 @@ public: /// hasNote - Return true if this function has given note. - bool hasNote(ParameterAttributes N) const { + bool hasNote(Attributes N) const { // Notes are stored at ~0 index in parameter attribute list return (!isDeclaration() && paramHasAttr(~0, N)); } /// setNotes - Set notes for this function /// - void setNotes(const ParameterAttributes N) { + void setNotes(const Attributes N) { // Notes are stored at ~0 index in parameter attribute list addParamAttr(~0, N); } @@ -170,15 +170,15 @@ public: void clearGC(); /// @brief Determine whether the function has the given attribute. - bool paramHasAttr(unsigned i, ParameterAttributes attr) const { + bool paramHasAttr(unsigned i, Attributes attr) const { return ParamAttrs.paramHasAttr(i, attr); } /// addParamAttr - adds the attribute to the list of attributes. - void addParamAttr(unsigned i, ParameterAttributes attr); + void addParamAttr(unsigned i, Attributes attr); /// removeParamAttr - removes the attribute from the list of attributes. - void removeParamAttr(unsigned i, ParameterAttributes attr); + void removeParamAttr(unsigned i, Attributes attr); /// @brief Extract the alignment for a call or parameter (0=unknown). unsigned getParamAlignment(unsigned i) const { diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 272ccec..b897a39 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -20,7 +20,7 @@ #include "llvm/InstrTypes.h" #include "llvm/DerivedTypes.h" -#include "llvm/ParameterAttributes.h" +#include "llvm/Attributes.h" #include "llvm/BasicBlock.h" #include "llvm/ADT/SmallVector.h" @@ -1081,10 +1081,10 @@ public: void setParamAttrs(const PAListPtr &Attrs) { ParamAttrs = Attrs; } /// addParamAttr - adds the attribute to the list of attributes. - void addParamAttr(unsigned i, ParameterAttributes attr); + void addParamAttr(unsigned i, Attributes attr); /// removeParamAttr - removes the attribute from the list of attributes. - void removeParamAttr(unsigned i, ParameterAttributes attr); + void removeParamAttr(unsigned i, Attributes attr); /// @brief Determine whether the call or the callee has the given attribute. bool paramHasAttr(unsigned i, unsigned attr) const; @@ -2440,13 +2440,13 @@ public: void setParamAttrs(const PAListPtr &Attrs) { ParamAttrs = Attrs; } /// @brief Determine whether the call or the callee has the given attribute. - bool paramHasAttr(unsigned i, ParameterAttributes attr) const; + bool paramHasAttr(unsigned i, Attributes attr) const; /// addParamAttr - adds the attribute to the list of attributes. - void addParamAttr(unsigned i, ParameterAttributes attr); + void addParamAttr(unsigned i, Attributes attr); /// removeParamAttr - removes the attribute from the list of attributes. - void removeParamAttr(unsigned i, ParameterAttributes attr); + void removeParamAttr(unsigned i, Attributes attr); /// @brief Extract the alignment for a call or parameter (0=unknown). unsigned getParamAlignment(unsigned i) const { diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index ce95cc5..2e258a5 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -22,7 +22,7 @@ #include "llvm/Instruction.h" #include "llvm/BasicBlock.h" -#include "llvm/ParameterAttributes.h" +#include "llvm/Attributes.h" namespace llvm { @@ -68,7 +68,7 @@ public: void setParamAttrs(const PAListPtr &PAL); /// paramHasAttr - whether the call or the callee has the given attribute. - bool paramHasAttr(uint16_t i, ParameterAttributes attr) const; + bool paramHasAttr(uint16_t i, Attributes attr) const; /// @brief Extract the alignment for a call or parameter (0=unknown). uint16_t getParamAlignment(uint16_t i) const; |