summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-12-30 10:32:01 +0000
committerBill Wendling <isanbard@gmail.com>2012-12-30 10:32:01 +0000
commit698e84fc4f0012b43e21e78d61bc59cf2c12768f (patch)
treebbfcd86288583d51578837af9fc65e690b84e10d /llvm/lib/VMCore/AsmWriter.cpp
parent6190254e0f64cd87ec3a29c19e535d6f833ffd0d (diff)
downloadbcm5719-llvm-698e84fc4f0012b43e21e78d61bc59cf2c12768f.tar.gz
bcm5719-llvm-698e84fc4f0012b43e21e78d61bc59cf2c12768f.zip
Remove the Function::getFnAttributes method in favor of using the AttributeSet
directly. This is in preparation for removing the use of the 'Attribute' class as a collection of attributes. That will shift to the AttributeSet class instead. llvm-svn: 171253
Diffstat (limited to 'llvm/lib/VMCore/AsmWriter.cpp')
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index da92c853817..08aa73cfa9f 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -1601,9 +1601,8 @@ void AssemblyWriter::printFunction(const Function *F) {
Out << ')';
if (F->hasUnnamedAddr())
Out << " unnamed_addr";
- Attribute FnAttrs = Attrs.getFnAttributes();
- if (FnAttrs.hasAttributes())
- Out << ' ' << Attrs.getFnAttributes().getAsString();
+ if (Attrs.hasAttributes(AttributeSet::FunctionIndex))
+ Out << ' ' << Attrs.getAsString(AttributeSet::FunctionIndex);
if (F->hasSection()) {
Out << " section \"";
PrintEscapedString(F->getSection(), Out);
@@ -1875,8 +1874,8 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
writeParamOperand(CI->getArgOperand(op), PAL.getParamAttributes(op + 1));
}
Out << ')';
- if (PAL.getFnAttributes().hasAttributes())
- Out << ' ' << PAL.getFnAttributes().getAsString();
+ if (PAL.hasAttributes(AttributeSet::FunctionIndex))
+ Out << ' ' << PAL.getAsString(AttributeSet::FunctionIndex);
} else if (const InvokeInst *II = dyn_cast<InvokeInst>(&I)) {
Operand = II->getCalledValue();
PointerType *PTy = cast<PointerType>(Operand->getType());
@@ -1915,8 +1914,8 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
}
Out << ')';
- if (PAL.getFnAttributes().hasAttributes())
- Out << ' ' << PAL.getFnAttributes().getAsString();
+ if (PAL.hasAttributes(AttributeSet::FunctionIndex))
+ Out << ' ' << PAL.getAsString(AttributeSet::FunctionIndex);
Out << "\n to ";
writeOperand(II->getNormalDest(), true);
OpenPOWER on IntegriCloud