mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
Remove the final bits of Attributes being declared in the Attribute
namespace. Use the attribute's enum value instead. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165610 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2062,12 +2062,15 @@ static void ChangeCalleesToFastCall(Function *F) {
|
||||
}
|
||||
|
||||
static AttrListPtr StripNest(const AttrListPtr &Attrs) {
|
||||
Attributes::Builder B;
|
||||
B.addAttribute(Attributes::Nest);
|
||||
|
||||
for (unsigned i = 0, e = Attrs.getNumSlots(); i != e; ++i) {
|
||||
if (!Attrs.getSlot(i).Attrs.hasAttribute(Attributes::Nest))
|
||||
continue;
|
||||
|
||||
// There can be only one.
|
||||
return Attrs.removeAttr(Attrs.getSlot(i).Index, Attribute::Nest);
|
||||
return Attrs.removeAttr(Attrs.getSlot(i).Index, Attributes::get(B));
|
||||
}
|
||||
|
||||
return Attrs;
|
||||
@@ -2108,7 +2111,7 @@ bool GlobalOpt::OptimizeFunctions(Module &M) {
|
||||
Changed = true;
|
||||
}
|
||||
|
||||
if (F->getAttributes().hasAttrSomewhere(Attribute::Nest) &&
|
||||
if (F->getAttributes().hasAttrSomewhere(Attributes::Nest) &&
|
||||
!F->hasAddressTaken()) {
|
||||
// The function is not used by a trampoline intrinsic, so it is safe
|
||||
// to remove the 'nest' attribute.
|
||||
|
Reference in New Issue
Block a user