mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-19 19:31:50 +00:00
Use method to query for attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165209 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5df15c692b
commit
b44e3ee1a7
@ -2063,7 +2063,7 @@ static void ChangeCalleesToFastCall(Function *F) {
|
||||
|
||||
static AttrListPtr StripNest(const AttrListPtr &Attrs) {
|
||||
for (unsigned i = 0, e = Attrs.getNumSlots(); i != e; ++i) {
|
||||
if ((Attrs.getSlot(i).Attrs & Attribute::Nest) == 0)
|
||||
if (!Attrs.getSlot(i).Attrs.hasNestAttr())
|
||||
continue;
|
||||
|
||||
// There can be only one.
|
||||
|
@ -714,7 +714,7 @@ bool CodeGenPrepare::DupRetToEnableTailCallOpts(ReturnInst *RI) {
|
||||
// See llvm::isInTailCallPosition().
|
||||
const Function *F = BB->getParent();
|
||||
Attributes CallerRetAttr = F->getAttributes().getRetAttributes();
|
||||
if ((CallerRetAttr & Attribute::ZExt) || (CallerRetAttr & Attribute::SExt))
|
||||
if (CallerRetAttr.hasZExtAttr() || CallerRetAttr.hasSExtAttr())
|
||||
return false;
|
||||
|
||||
// Make sure there are no instructions between the PHI and return, or that the
|
||||
|
@ -1243,7 +1243,7 @@ void AssemblyWriter::writeParamOperand(const Value *Operand,
|
||||
// Print the type
|
||||
TypePrinter.print(Operand->getType(), Out);
|
||||
// Print parameter attributes list
|
||||
if (Attrs != Attribute::None)
|
||||
if (Attrs.hasAttributes())
|
||||
Out << ' ' << Attrs.getAsString();
|
||||
Out << ' ';
|
||||
// Print the operand
|
||||
@ -1556,7 +1556,7 @@ void AssemblyWriter::printFunction(const Function *F) {
|
||||
FunctionType *FT = F->getFunctionType();
|
||||
const AttrListPtr &Attrs = F->getAttributes();
|
||||
Attributes RetAttrs = Attrs.getRetAttributes();
|
||||
if (RetAttrs != Attribute::None)
|
||||
if (RetAttrs.hasAttributes())
|
||||
Out << Attrs.getRetAttributes().getAsString() << ' ';
|
||||
TypePrinter.print(F->getReturnType(), Out);
|
||||
Out << ' ';
|
||||
@ -1586,7 +1586,7 @@ void AssemblyWriter::printFunction(const Function *F) {
|
||||
TypePrinter.print(FT->getParamType(i), Out);
|
||||
|
||||
Attributes ArgAttrs = Attrs.getParamAttributes(i+1);
|
||||
if (ArgAttrs != Attribute::None)
|
||||
if (ArgAttrs.hasAttributes())
|
||||
Out << ' ' << ArgAttrs.getAsString();
|
||||
}
|
||||
}
|
||||
@ -1600,7 +1600,7 @@ void AssemblyWriter::printFunction(const Function *F) {
|
||||
if (F->hasUnnamedAddr())
|
||||
Out << " unnamed_addr";
|
||||
Attributes FnAttrs = Attrs.getFnAttributes();
|
||||
if (FnAttrs != Attribute::None)
|
||||
if (FnAttrs.hasAttributes())
|
||||
Out << ' ' << Attrs.getFnAttributes().getAsString();
|
||||
if (F->hasSection()) {
|
||||
Out << " section \"";
|
||||
@ -1634,7 +1634,7 @@ void AssemblyWriter::printArgument(const Argument *Arg,
|
||||
TypePrinter.print(Arg->getType(), Out);
|
||||
|
||||
// Output parameter attributes list
|
||||
if (Attrs != Attribute::None)
|
||||
if (Attrs.hasAttributes())
|
||||
Out << ' ' << Attrs.getAsString();
|
||||
|
||||
// Output name, if available...
|
||||
@ -1849,7 +1849,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
|
||||
Type *RetTy = FTy->getReturnType();
|
||||
const AttrListPtr &PAL = CI->getAttributes();
|
||||
|
||||
if (PAL.getRetAttributes() != Attribute::None)
|
||||
if (PAL.getRetAttributes().hasAttributes())
|
||||
Out << ' ' << PAL.getRetAttributes().getAsString();
|
||||
|
||||
// If possible, print out the short form of the call instruction. We can
|
||||
@ -1873,7 +1873,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
|
||||
writeParamOperand(CI->getArgOperand(op), PAL.getParamAttributes(op + 1));
|
||||
}
|
||||
Out << ')';
|
||||
if (PAL.getFnAttributes() != Attribute::None)
|
||||
if (PAL.getFnAttributes().hasAttributes())
|
||||
Out << ' ' << PAL.getFnAttributes().getAsString();
|
||||
} else if (const InvokeInst *II = dyn_cast<InvokeInst>(&I)) {
|
||||
Operand = II->getCalledValue();
|
||||
@ -1888,7 +1888,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
|
||||
PrintCallingConv(II->getCallingConv(), Out);
|
||||
}
|
||||
|
||||
if (PAL.getRetAttributes() != Attribute::None)
|
||||
if (PAL.getRetAttributes().hasAttributes())
|
||||
Out << ' ' << PAL.getRetAttributes().getAsString();
|
||||
|
||||
// If possible, print out the short form of the invoke instruction. We can
|
||||
@ -1913,7 +1913,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
|
||||
}
|
||||
|
||||
Out << ')';
|
||||
if (PAL.getFnAttributes() != Attribute::None)
|
||||
if (PAL.getFnAttributes().hasAttributes())
|
||||
Out << ' ' << PAL.getFnAttributes().getAsString();
|
||||
|
||||
Out << "\n to ";
|
||||
|
Loading…
x
Reference in New Issue
Block a user