@@ -3682,7 +3682,7 @@ void AssemblyWriter::printFunction(const Function *F) {
3682
3682
Out << " ; Materializable\n " ;
3683
3683
3684
3684
const AttributeList &Attrs = F->getAttributes ();
3685
- if (Attrs.hasAttributes (AttributeList::FunctionIndex )) {
3685
+ if (Attrs.hasFnAttrs ( )) {
3686
3686
AttributeSet AS = Attrs.getFnAttrs ();
3687
3687
std::string AttrStr;
3688
3688
@@ -3720,7 +3720,7 @@ void AssemblyWriter::printFunction(const Function *F) {
3720
3720
}
3721
3721
3722
3722
FunctionType *FT = F->getFunctionType ();
3723
- if (Attrs.hasAttributes (AttributeList::ReturnIndex ))
3723
+ if (Attrs.hasRetAttrs ( ))
3724
3724
Out << Attrs.getAsString (AttributeList::ReturnIndex) << ' ' ;
3725
3725
TypePrinter.print (F->getReturnType (), Out);
3726
3726
Out << ' ' ;
@@ -3769,7 +3769,7 @@ void AssemblyWriter::printFunction(const Function *F) {
3769
3769
if (F->getAddressSpace () != 0 || !Mod ||
3770
3770
Mod->getDataLayout ().getProgramAddressSpace () != 0 )
3771
3771
Out << " addrspace(" << F->getAddressSpace () << " )" ;
3772
- if (Attrs.hasAttributes (AttributeList::FunctionIndex ))
3772
+ if (Attrs.hasFnAttrs ( ))
3773
3773
Out << " #" << Machine.getAttributeGroupSlot (Attrs.getFnAttrs ());
3774
3774
if (F->hasSection ()) {
3775
3775
Out << " section \" " ;
@@ -4126,7 +4126,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
4126
4126
Type *RetTy = FTy->getReturnType ();
4127
4127
const AttributeList &PAL = CI->getAttributes ();
4128
4128
4129
- if (PAL.hasAttributes (AttributeList::ReturnIndex ))
4129
+ if (PAL.hasRetAttrs ( ))
4130
4130
Out << ' ' << PAL.getAsString (AttributeList::ReturnIndex);
4131
4131
4132
4132
// Only print addrspace(N) if necessary:
@@ -4155,7 +4155,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
4155
4155
Out << " , ..." ;
4156
4156
4157
4157
Out << ' )' ;
4158
- if (PAL.hasAttributes (AttributeList::FunctionIndex ))
4158
+ if (PAL.hasFnAttrs ( ))
4159
4159
Out << " #" << Machine.getAttributeGroupSlot (PAL.getFnAttrs ());
4160
4160
4161
4161
writeOperandBundles (CI);
@@ -4171,7 +4171,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
4171
4171
PrintCallingConv (II->getCallingConv (), Out);
4172
4172
}
4173
4173
4174
- if (PAL.hasAttributes (AttributeList::ReturnIndex ))
4174
+ if (PAL.hasRetAttrs ( ))
4175
4175
Out << ' ' << PAL.getAsString (AttributeList::ReturnIndex);
4176
4176
4177
4177
// Only print addrspace(N) if necessary:
@@ -4193,7 +4193,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
4193
4193
}
4194
4194
4195
4195
Out << ' )' ;
4196
- if (PAL.hasAttributes (AttributeList::FunctionIndex ))
4196
+ if (PAL.hasFnAttrs ( ))
4197
4197
Out << " #" << Machine.getAttributeGroupSlot (PAL.getFnAttrs ());
4198
4198
4199
4199
writeOperandBundles (II);
@@ -4214,7 +4214,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
4214
4214
PrintCallingConv (CBI->getCallingConv (), Out);
4215
4215
}
4216
4216
4217
- if (PAL.hasAttributes (AttributeList::ReturnIndex ))
4217
+ if (PAL.hasRetAttrs ( ))
4218
4218
Out << ' ' << PAL.getAsString (AttributeList::ReturnIndex);
4219
4219
4220
4220
// If possible, print out the short form of the callbr instruction. We can
@@ -4233,7 +4233,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
4233
4233
}
4234
4234
4235
4235
Out << ' )' ;
4236
- if (PAL.hasAttributes (AttributeList::FunctionIndex ))
4236
+ if (PAL.hasFnAttrs ( ))
4237
4237
Out << " #" << Machine.getAttributeGroupSlot (PAL.getFnAttrs ());
4238
4238
4239
4239
writeOperandBundles (CBI);
0 commit comments