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 | |
parent | 550f0ade457c3b042fa099ecff2c022c7ab58b1e (diff) |
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
38 files changed, 214 insertions, 214 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. diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index e854ddb05e..16b955d58f 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -2813,7 +2813,7 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) { if (RetAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::ReturnIndex, + AttributeWithIndex::get(AttributeSet::ReturnIndex, Attributes::get(RetType->getContext(), RetAttrs))); @@ -2825,11 +2825,11 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) { if (FuncAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::FunctionIndex, + AttributeWithIndex::get(AttributeSet::FunctionIndex, Attributes::get(RetType->getContext(), FuncAttrs))); - AttrListPtr PAL = AttrListPtr::get(Context, Attrs); + AttributeSet PAL = AttributeSet::get(Context, Attrs); if (PAL.getParamAttributes(1).hasAttribute(Attributes::StructRet) && !RetType->isVoidTy()) @@ -3358,7 +3358,7 @@ bool LLParser::ParseInvoke(Instruction *&Inst, PerFunctionState &PFS) { SmallVector<AttributeWithIndex, 8> Attrs; if (RetAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::ReturnIndex, + AttributeWithIndex::get(AttributeSet::ReturnIndex, Attributes::get(Callee->getContext(), RetAttrs))); @@ -3389,12 +3389,12 @@ bool LLParser::ParseInvoke(Instruction *&Inst, PerFunctionState &PFS) { if (FnAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::FunctionIndex, + AttributeWithIndex::get(AttributeSet::FunctionIndex, Attributes::get(Callee->getContext(), FnAttrs))); // Finish off the Attributes and check them - AttrListPtr PAL = AttrListPtr::get(Context, Attrs); + AttributeSet PAL = AttributeSet::get(Context, Attrs); InvokeInst *II = InvokeInst::Create(Callee, NormalBB, UnwindBB, Args); II->setCallingConv(CC); @@ -3760,7 +3760,7 @@ bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS, SmallVector<AttributeWithIndex, 8> Attrs; if (RetAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::ReturnIndex, + AttributeWithIndex::get(AttributeSet::ReturnIndex, Attributes::get(Callee->getContext(), RetAttrs))); @@ -3791,12 +3791,12 @@ bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS, if (FnAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::FunctionIndex, + AttributeWithIndex::get(AttributeSet::FunctionIndex, Attributes::get(Callee->getContext(), FnAttrs))); // Finish off the Attributes and check them - AttrListPtr PAL = AttrListPtr::get(Context, Attrs); + AttributeSet PAL = AttributeSet::get(Context, Attrs); CallInst *CI = CallInst::Create(Callee, Args); CI->setTailCall(isTail); diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 95fc9ca620..cb1a835185 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -47,7 +47,7 @@ void BitcodeReader::FreeState() { ValueList.clear(); MDValueList.clear(); - std::vector<AttrListPtr>().swap(MAttributes); + std::vector<AttributeSet>().swap(MAttributes); std::vector<BasicBlock*>().swap(FunctionBBs); std::vector<Function*>().swap(FunctionsWithBodies); DeferredFunctionInfo.clear(); @@ -487,7 +487,7 @@ bool BitcodeReader::ParseAttributeBlock() { Attributes::get(Context, B))); } - MAttributes.push_back(AttrListPtr::get(Context, Attrs)); + MAttributes.push_back(AttributeSet::get(Context, Attrs)); Attrs.clear(); break; } @@ -2398,7 +2398,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) { case bitc::FUNC_CODE_INST_INVOKE: { // INVOKE: [attrs, cc, normBB, unwindBB, fnty, op0,op1,op2, ...] if (Record.size() < 4) return Error("Invalid INVOKE record"); - AttrListPtr PAL = getAttributes(Record[0]); + AttributeSet PAL = getAttributes(Record[0]); unsigned CCInfo = Record[1]; BasicBlock *NormalBB = getBasicBlock(Record[2]); BasicBlock *UnwindBB = getBasicBlock(Record[3]); @@ -2663,7 +2663,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) { if (Record.size() < 3) return Error("Invalid CALL record"); - AttrListPtr PAL = getAttributes(Record[0]); + AttributeSet PAL = getAttributes(Record[0]); unsigned CCInfo = Record[1]; unsigned OpNum = 2; diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h index 34e96b07b4..6d27eff128 100644 --- a/lib/Bitcode/Reader/BitcodeReader.h +++ b/lib/Bitcode/Reader/BitcodeReader.h @@ -146,7 +146,7 @@ class BitcodeReader : public GVMaterializer { /// MAttributes - The set of attributes by index. Index zero in the /// file is for null, and is thus not represented here. As such all indices /// are off by one. - std::vector<AttrListPtr> MAttributes; + std::vector<AttributeSet> MAttributes; /// FunctionBBs - While parsing a function body, this is a list of the basic /// blocks for the function. @@ -246,10 +246,10 @@ private: if (ID >= FunctionBBs.size()) return 0; // Invalid ID return FunctionBBs[ID]; } - AttrListPtr getAttributes(unsigned i) const { + AttributeSet getAttributes(unsigned i) const { if (i-1 < MAttributes.size()) return MAttributes[i-1]; - return AttrListPtr(); + return AttributeSet(); } /// getValueTypePair - Read a value/type pair out of the specified record from diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index dec28f4ada..d616eda9b9 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -164,14 +164,14 @@ static void WriteStringRecord(unsigned Code, StringRef Str, // Emit information about parameter attributes. static void WriteAttributeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) { - const std::vector<AttrListPtr> &Attrs = VE.getAttributes(); + const std::vector<AttributeSet> &Attrs = VE.getAttributes(); if (Attrs.empty()) return; Stream.EnterSubblock(bitc::PARAMATTR_BLOCK_ID, 3); SmallVector<uint64_t, 64> Record; for (unsigned i = 0, e = Attrs.size(); i != e; ++i) { - const AttrListPtr &A = Attrs[i]; + const AttributeSet &A = Attrs[i]; for (unsigned i = 0, e = A.getNumSlots(); i != e; ++i) { const AttributeWithIndex &PAWI = A.getSlot(i); Record.push_back(PAWI.Index); diff --git a/lib/Bitcode/Writer/ValueEnumerator.cpp b/lib/Bitcode/Writer/ValueEnumerator.cpp index 04877bb786..3c2cce0a16 100644 --- a/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -418,7 +418,7 @@ void ValueEnumerator::EnumerateOperandType(const Value *V) { EnumerateMetadata(V); } -void ValueEnumerator::EnumerateAttributes(const AttrListPtr &PAL) { +void ValueEnumerator::EnumerateAttributes(const AttributeSet &PAL) { if (PAL.isEmpty()) return; // null is always 0. // Do a lookup. unsigned &Entry = AttributeMap[PAL.getRawPointer()]; diff --git a/lib/Bitcode/Writer/ValueEnumerator.h b/lib/Bitcode/Writer/ValueEnumerator.h index 896fc3d0c8..5aeea2001f 100644 --- a/lib/Bitcode/Writer/ValueEnumerator.h +++ b/lib/Bitcode/Writer/ValueEnumerator.h @@ -29,7 +29,7 @@ class Function; class Module; class MDNode; class NamedMDNode; -class AttrListPtr; +class AttributeSet; class ValueSymbolTable; class MDSymbolTable; class raw_ostream; @@ -54,7 +54,7 @@ private: typedef DenseMap<void*, unsigned> AttributeMapType; AttributeMapType AttributeMap; - std::vector<AttrListPtr> Attributes; + std::vector<AttributeSet> Attributes; /// GlobalBasicBlockIDs - This map memoizes the basic block ID's referenced by /// the "getGlobalBasicBlockID" method. @@ -98,7 +98,7 @@ public: unsigned getInstructionID(const Instruction *I) const; void setInstructionID(const Instruction *I); - unsigned getAttributeID(const AttrListPtr &PAL) const { + unsigned getAttributeID(const AttributeSet &PAL) const { if (PAL.isEmpty()) return 0; // Null maps to zero. AttributeMapType::const_iterator I = AttributeMap.find(PAL.getRawPointer()); assert(I != AttributeMap.end() && "Attribute not in ValueEnumerator!"); @@ -121,7 +121,7 @@ public: const std::vector<const BasicBlock*> &getBasicBlocks() const { return BasicBlocks; } - const std::vector<AttrListPtr> &getAttributes() const { + const std::vector<AttributeSet> &getAttributes() const { return Attributes; } @@ -146,7 +146,7 @@ private: void EnumerateValue(const Value *V); void EnumerateType(Type *T); void EnumerateOperandType(const Value *V); - void EnumerateAttributes(const AttrListPtr &PAL); + void EnumerateAttributes(const AttributeSet &PAL); void EnumerateValueSymbolTable(const ValueSymbolTable &ST); void EnumerateNamedMetadata(const Module *M); diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 218864a091..788c6e6866 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -141,7 +141,7 @@ namespace { std::string getCppName(const Value* val); inline void printCppName(const Value* val); - void printAttributes(const AttrListPtr &PAL, const std::string &name); + void printAttributes(const AttributeSet &PAL, const std::string &name); void printType(Type* Ty); void printTypes(const Module* M); @@ -464,9 +464,9 @@ void CppWriter::printCppName(const Value* val) { printEscapedString(getCppName(val)); } -void CppWriter::printAttributes(const AttrListPtr &PAL, +void CppWriter::printAttributes(const AttributeSet &PAL, const std::string &name) { - Out << "AttrListPtr " << name << "_PAL;"; + Out << "AttributeSet " << name << "_PAL;"; nl(Out); if (!PAL.isEmpty()) { Out << '{'; in(); nl(Out); @@ -518,7 +518,7 @@ void CppWriter::printAttributes(const AttrListPtr &PAL, Out << "Attrs.push_back(PAWI);"; nl(Out); } - Out << name << "_PAL = AttrListPtr::get(mod->getContext(), Attrs);"; + Out << name << "_PAL = AttributeSet::get(mod->getContext(), Attrs);"; nl(Out); out(); nl(Out); Out << '}'; nl(Out); diff --git a/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp b/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp index 356d68b509..5238ad0040 100644 --- a/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp +++ b/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp @@ -104,7 +104,7 @@ Function *MBlazeIntrinsicInfo::getDeclaration(Module *M, unsigned IntrID, Type **Tys, unsigned numTy) const { assert(!isOverloaded(IntrID) && "MBlaze intrinsics are not overloaded"); - AttrListPtr AList = getAttributes(M->getContext(), + AttributeSet AList = getAttributes(M->getContext(), (mblazeIntrinsic::ID) IntrID); return cast<Function>(M->getOrInsertFunction(getName(IntrID), getType(M->getContext(), IntrID), diff --git a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp index abf3a80fb9..af07576d59 100644 --- a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp +++ b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp @@ -1487,7 +1487,7 @@ void NVPTXAsmPrinter::printParamName(int paramIndex, raw_ostream &O) { void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) { const DataLayout *TD = TM.getDataLayout(); - const AttrListPtr &PAL = F->getAttributes(); + const AttributeSet &PAL = F->getAttributes(); const TargetLowering *TLI = TM.getTargetLowering(); |