diff options
author | Devang Patel <dpatel@apple.com> | 2008-09-25 21:00:45 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-09-25 21:00:45 +0000 |
commit | 0598866c052147c31b808391f58434ce3dbfb838 (patch) | |
tree | 5a33037d52126e5eb635d76afe643d9b854694a1 /lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 32b952a2a60d1091e0e17bb6ce788cd1d41e6f8b (diff) |
Large mechanical patch.
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | lib/Bitcode/Writer/BitcodeWriter.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index baacbddf96..4b0664e27b 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -108,18 +108,18 @@ static void WriteStringRecord(unsigned Code, const std::string &Str, } // Emit information about parameter attributes. -static void WriteParamAttrTable(const ValueEnumerator &VE, +static void WriteAttributeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) { - const std::vector<PAListPtr> &Attrs = VE.getParamAttrs(); + const std::vector<AttrListPtr> &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 PAListPtr &A = Attrs[i]; + const AttrListPtr &A = Attrs[i]; for (unsigned i = 0, e = A.getNumSlots(); i != e; ++i) { - const FnAttributeWithIndex &PAWI = A.getSlot(i); + const AttributeWithIndex &PAWI = A.getSlot(i); Record.push_back(PAWI.Index); Record.push_back(PAWI.Attrs); } @@ -407,7 +407,7 @@ static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE, Vals.push_back(F->getCallingConv()); Vals.push_back(F->isDeclaration()); Vals.push_back(getEncodedLinkage(F)); - Vals.push_back(VE.getParamAttrID(F->getParamAttrs())); + Vals.push_back(VE.getAttributeID(F->getAttributes())); Vals.push_back(Log2_32(F->getAlignment())+1); Vals.push_back(F->hasSection() ? SectionMap[F->getSection()] : 0); Vals.push_back(getEncodedVisibility(F)); @@ -818,7 +818,7 @@ static void WriteInstruction(const Instruction &I, unsigned InstID, Code = bitc::FUNC_CODE_INST_INVOKE; const InvokeInst *II = cast<InvokeInst>(&I); - Vals.push_back(VE.getParamAttrID(II->getParamAttrs())); + Vals.push_back(VE.getAttributeID(II->getAttributes())); Vals.push_back(II->getCallingConv()); Vals.push_back(VE.getValueID(I.getOperand(1))); // normal dest Vals.push_back(VE.getValueID(I.getOperand(2))); // unwind dest @@ -892,7 +892,7 @@ static void WriteInstruction(const Instruction &I, unsigned InstID, Code = bitc::FUNC_CODE_INST_CALL; const CallInst *CI = cast<CallInst>(&I); - Vals.push_back(VE.getParamAttrID(CI->getParamAttrs())); + Vals.push_back(VE.getAttributeID(CI->getAttributes())); Vals.push_back((CI->getCallingConv() << 1) | unsigned(CI->isTailCall())); PushValueAndType(CI->getOperand(0), InstID, Vals, VE); // Callee @@ -1226,7 +1226,7 @@ static void WriteModule(const Module *M, BitstreamWriter &Stream) { WriteBlockInfo(VE, Stream); // Emit information about parameter attributes. - WriteParamAttrTable(VE, Stream); + WriteAttributeTable(VE, Stream); // Emit information describing all of the types in the module. WriteTypeTable(VE, Stream); |