diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-07 23:16:57 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-07 23:16:57 +0000 |
commit | 99faa3b4ec6d03ac7808fe4ff3fbf3d04e375502 (patch) | |
tree | 6239d55788f1895cdaf8f3d0c1ed96f66902b59d /include | |
parent | 550f0ade457c3b042fa099ecff2c022c7ab58b1e (diff) | |
download | llvm-99faa3b4ec6d03ac7808fe4ff3fbf3d04e375502.tar.gz llvm-99faa3b4ec6d03ac7808fe4ff3fbf3d04e375502.tar.bz2 llvm-99faa3b4ec6d03ac7808fe4ff3fbf3d04e375502.tar.xz |
s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Attributes.h | 24 | ||||
-rw-r--r-- | include/llvm/Function.h | 8 | ||||
-rw-r--r-- | include/llvm/Instructions.h | 34 | ||||
-rw-r--r-- | include/llvm/Intrinsics.h | 4 | ||||
-rw-r--r-- | include/llvm/Module.h | 6 | ||||
-rw-r--r-- | include/llvm/Support/CallSite.h | 4 | ||||
-rw-r--r-- | include/llvm/Transforms/Utils/BuildLibCalls.h | 2 |
7 files changed, 41 insertions, 41 deletions
diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index 1059c6d5ff..ed18ca4c40 100644 --- a/include/llvm/Attributes.h +++ b/include/llvm/Attributes.h @@ -298,14 +298,14 @@ struct AttributeWithIndex { }; //===----------------------------------------------------------------------===// -// AttrListPtr Smart Pointer +// AttributeSet Smart Pointer //===----------------------------------------------------------------------===// class AttributeListImpl; -/// AttrListPtr - This class manages the ref count for the opaque +/// AttributeSet - This class manages the ref count for the opaque /// AttributeListImpl object and provides accessors for it. -class AttrListPtr { +class AttributeSet { public: enum AttrIndex { ReturnIndex = 0U, @@ -320,28 +320,28 @@ private: /// for the result are denoted with Idx = 0. Attributes getAttributes(unsigned Idx) const; - explicit AttrListPtr(AttributeListImpl *LI) : AttrList(LI) {} + explicit AttributeSet(AttributeListImpl *LI) : AttrList(LI) {} public: - AttrListPtr() : AttrList(0) {} - AttrListPtr(const AttrListPtr &P) : AttrList(P.AttrList) {} - const AttrListPtr &operator=(const AttrListPtr &RHS); + AttributeSet() : AttrList(0) {} + AttributeSet(const AttributeSet &P) : AttrList(P.AttrList) {} + const AttributeSet &operator=(const AttributeSet &RHS); //===--------------------------------------------------------------------===// // Attribute List Construction and Mutation //===--------------------------------------------------------------------===// /// get - Return a Attributes list with the specified parameters in it. - static AttrListPtr get(LLVMContext &C, ArrayRef<AttributeWithIndex> Attrs); + static AttributeSet get(LLVMContext &C, ArrayRef<AttributeWithIndex> Attrs); /// addAttr - Add the specified attribute at the specified index to this /// attribute list. Since attribute lists are immutable, this /// returns the new list. - AttrListPtr addAttr(LLVMContext &C, unsigned Idx, Attributes Attrs) const; + AttributeSet addAttr(LLVMContext &C, unsigned Idx, Attributes Attrs) const; /// removeAttr - Remove the specified attribute at the specified index from /// this attribute list. Since attribute lists are immutable, this /// returns the new list. - AttrListPtr removeAttr(LLVMContext &C, unsigned Idx, Attributes Attrs) const; + AttributeSet removeAttr(LLVMContext &C, unsigned Idx, Attributes Attrs) const; //===--------------------------------------------------------------------===// // Attribute List Accessors @@ -383,9 +383,9 @@ public: Attributes &getAttributesAtIndex(unsigned i) const; /// operator==/!= - Provide equality predicates. - bool operator==(const AttrListPtr &RHS) const + bool operator==(const AttributeSet &RHS) const { return AttrList == RHS.AttrList; } - bool operator!=(const AttrListPtr &RHS) const + bool operator!=(const AttributeSet &RHS) const { return AttrList != RHS.AttrList; } //===--------------------------------------------------------------------===// diff --git a/include/llvm/Function.h b/include/llvm/Function.h index d864711046..b49b8c1457 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -85,7 +85,7 @@ private: BasicBlockListType BasicBlocks; ///< The basic blocks mutable ArgumentListType ArgumentList; ///< The formal arguments ValueSymbolTable *SymTab; ///< Symbol table of args/instructions - AttrListPtr AttributeList; ///< Parameter attributes + AttributeSet AttributeList; ///< Parameter attributes // HasLazyArguments is stored in Value::SubclassData. /*bool HasLazyArguments;*/ @@ -162,11 +162,11 @@ public: /// getAttributes - Return the attribute list for this Function. /// - const AttrListPtr &getAttributes() const { return AttributeList; } + const AttributeSet &getAttributes() const { return AttributeList; } /// setAttributes - Set the attribute list for this Function. /// - void setAttributes(const AttrListPtr &attrs) { AttributeList = attrs; } + void setAttributes(const AttributeSet &attrs) { AttributeList = attrs; } /// getFnAttributes - Return the function attributes for querying. /// @@ -178,7 +178,7 @@ public: /// void addFnAttr(Attributes::AttrVal N) { // Function Attributes are stored at ~0 index - addAttribute(AttrListPtr::FunctionIndex, Attributes::get(getContext(), N)); + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), N)); } /// removeFnAttr - Remove function attributes from this function. diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 631f58bd38..9c5a2db2fe 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -1156,7 +1156,7 @@ public: /// hold the calling convention of the call. /// class CallInst : public Instruction { - AttrListPtr AttributeList; ///< parameter attributes for call + AttributeSet AttributeList; ///< parameter attributes for call CallInst(const CallInst &CI); void init(Value *Func, ArrayRef<Value *> Args, const Twine &NameStr); void init(Value *Func, const Twine &NameStr); @@ -1254,11 +1254,11 @@ public: /// getAttributes - Return the parameter attributes for this call. /// - const AttrListPtr &getAttributes() const { return AttributeList; } + const AttributeSet &getAttributes() const { return AttributeList; } /// setAttributes - Set the parameter attributes for this call. /// - void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; } + void setAttributes(const AttributeSet &Attrs) { AttributeList = Attrs; } /// addAttribute - adds the attribute to the list of attributes. void addAttribute(unsigned i, Attributes attr); @@ -1280,7 +1280,7 @@ public: /// \brief Return true if the call should not be inlined. bool isNoInline() const { return hasFnAttr(Attributes::NoInline); } void setIsNoInline() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoInline)); } @@ -1289,7 +1289,7 @@ public: return hasFnAttr(Attributes::ReturnsTwice); } void setCanReturnTwice() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::ReturnsTwice)); } @@ -1298,7 +1298,7 @@ public: return hasFnAttr(Attributes::ReadNone); } void setDoesNotAccessMemory() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::ReadNone)); } @@ -1307,21 +1307,21 @@ public: return doesNotAccessMemory() || hasFnAttr(Attributes::ReadOnly); } void setOnlyReadsMemory() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::ReadOnly)); } /// \brief Determine if the call cannot return. bool doesNotReturn() const { return hasFnAttr(Attributes::NoReturn); } void setDoesNotReturn() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoReturn)); } /// \brief Determine if the call cannot unwind. bool doesNotThrow() const { return hasFnAttr(Attributes::NoUnwind); } void setDoesNotThrow() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoUnwind)); } @@ -2942,7 +2942,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(IndirectBrInst, Value) /// calling convention of the call. /// class InvokeInst : public TerminatorInst { - AttrListPtr AttributeList; + AttributeSet AttributeList; InvokeInst(const InvokeInst &BI); void init(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef<Value *> Args, const Twine &NameStr); @@ -3003,11 +3003,11 @@ public: /// getAttributes - Return the parameter attributes for this invoke. /// - const AttrListPtr &getAttributes() const { return AttributeList; } + const AttributeSet &getAttributes() const { return AttributeList; } /// setAttributes - Set the parameter attributes for this invoke. /// - void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; } + void setAttributes(const AttributeSet &Attrs) { AttributeList = Attrs; } /// addAttribute - adds the attribute to the list of attributes. void addAttribute(unsigned i, Attributes attr); @@ -3029,7 +3029,7 @@ public: /// \brief Return true if the call should not be inlined. bool isNoInline() const { return hasFnAttr(Attributes::NoInline); } void setIsNoInline() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoInline)); } @@ -3038,7 +3038,7 @@ public: return hasFnAttr(Attributes::ReadNone); } void setDoesNotAccessMemory() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::ReadNone)); } @@ -3047,21 +3047,21 @@ public: return doesNotAccessMemory() || hasFnAttr(Attributes::ReadOnly); } void setOnlyReadsMemory() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::ReadOnly)); } /// \brief Determine if the call cannot return. bool doesNotReturn() const { return hasFnAttr(Attributes::NoReturn); } void setDoesNotReturn() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoReturn)); } /// \brief Determine if the call cannot unwind. bool doesNotThrow() const { return hasFnAttr(Attributes::NoUnwind); } void setDoesNotThrow() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoUnwind)); } diff --git a/include/llvm/Intrinsics.h b/include/llvm/Intrinsics.h index 3108a8e525..c1fe4c67c4 100644 --- a/include/llvm/Intrinsics.h +++ b/include/llvm/Intrinsics.h @@ -26,7 +26,7 @@ class FunctionType; class Function; class LLVMContext; class Module; -class AttrListPtr; +class AttributeSet; /// Intrinsic Namespace - This namespace contains an enum with a value for /// every intrinsic/builtin function known by LLVM. These enum values are @@ -58,7 +58,7 @@ namespace Intrinsic { /// Intrinsic::getAttributes(ID) - Return the attributes for an intrinsic. /// - AttrListPtr getAttributes(LLVMContext &C, ID id); + AttributeSet getAttributes(LLVMContext &C, ID id); /// Intrinsic::getDeclaration(M, ID) - Create or insert an LLVM Function /// declaration for an intrinsic, and return it. diff --git a/include/llvm/Module.h b/include/llvm/Module.h index e0cb32b022..92109024c0 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -312,7 +312,7 @@ public: /// 4. Finally, the function exists but has the wrong prototype: return the /// function with a constantexpr cast to the right prototype. Constant *getOrInsertFunction(StringRef Name, FunctionType *T, - AttrListPtr AttributeList); + AttributeSet AttributeList); Constant *getOrInsertFunction(StringRef Name, FunctionType *T); @@ -324,7 +324,7 @@ public: /// null terminated list of function arguments, which makes it easier for /// clients to use. Constant *getOrInsertFunction(StringRef Name, - AttrListPtr AttributeList, + AttributeSet AttributeList, Type *RetTy, ...) END_WITH_NULL; /// getOrInsertFunction - Same as above, but without the attributes. @@ -333,7 +333,7 @@ public: Constant *getOrInsertTargetIntrinsic(StringRef Name, FunctionType *Ty, - AttrListPtr AttributeList); + AttributeSet AttributeList); /// getFunction - Look up the specified function in the module symbol table. /// If it does not exist, return null. diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index 9cabf52d74..7a0b8db9bb 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -177,10 +177,10 @@ public: /// getAttributes/setAttributes - get or set the parameter attributes of /// the call. - const AttrListPtr &getAttributes() const { + const AttributeSet &getAttributes() const { CALLSITE_DELEGATE_GETTER(getAttributes()); } - void setAttributes(const AttrListPtr &PAL) { + void setAttributes(const AttributeSet &PAL) { CALLSITE_DELEGATE_SETTER(setAttributes(PAL)); } diff --git a/include/llvm/Transforms/Utils/BuildLibCalls.h b/include/llvm/Transforms/Utils/BuildLibCalls.h index ab9fc475fa..d5e7e87839 100644 --- a/include/llvm/Transforms/Utils/BuildLibCalls.h +++ b/include/llvm/Transforms/Utils/BuildLibCalls.h @@ -81,7 +81,7 @@ namespace llvm { /// 'l' is added as the suffix of name, if 'Op' is a float, we add a 'f' /// suffix. Value *EmitUnaryFloatFnCall(Value *Op, StringRef Name, IRBuilder<> &B, - const AttrListPtr &Attrs); + const AttributeSet &Attrs); /// EmitPutChar - Emit a call to the putchar function. This assumes that Char /// is an integer. |