mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-14 20:10:58 +00:00
[RS4GC] Bring legalizeCallAttributes up to LLVM coding style; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250490 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4e58da3bca
commit
46bd4a4f91
@ -1274,34 +1274,32 @@ static int find_index(ArrayRef<Value *> livevec, Value *val) {
|
|||||||
// Create new attribute set containing only attributes which can be transferred
|
// Create new attribute set containing only attributes which can be transferred
|
||||||
// from original call to the safepoint.
|
// from original call to the safepoint.
|
||||||
static AttributeSet legalizeCallAttributes(AttributeSet AS) {
|
static AttributeSet legalizeCallAttributes(AttributeSet AS) {
|
||||||
AttributeSet ret;
|
AttributeSet Ret;
|
||||||
|
|
||||||
for (unsigned Slot = 0; Slot < AS.getNumSlots(); Slot++) {
|
for (unsigned Slot = 0; Slot < AS.getNumSlots(); Slot++) {
|
||||||
unsigned index = AS.getSlotIndex(Slot);
|
unsigned Index = AS.getSlotIndex(Slot);
|
||||||
|
|
||||||
if (index == AttributeSet::ReturnIndex ||
|
if (Index == AttributeSet::ReturnIndex ||
|
||||||
index == AttributeSet::FunctionIndex) {
|
Index == AttributeSet::FunctionIndex) {
|
||||||
|
|
||||||
for (auto it = AS.begin(Slot), it_end = AS.end(Slot); it != it_end;
|
for (Attribute Attr : make_range(AS.begin(Slot), AS.end(Slot))) {
|
||||||
++it) {
|
|
||||||
Attribute attr = *it;
|
|
||||||
|
|
||||||
// Do not allow certain attributes - just skip them
|
// Do not allow certain attributes - just skip them
|
||||||
// Safepoint can not be read only or read none.
|
// Safepoint can not be read only or read none.
|
||||||
if (attr.hasAttribute(Attribute::ReadNone) ||
|
if (Attr.hasAttribute(Attribute::ReadNone) ||
|
||||||
attr.hasAttribute(Attribute::ReadOnly))
|
Attr.hasAttribute(Attribute::ReadOnly))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ret = ret.addAttributes(
|
Ret = Ret.addAttributes(
|
||||||
AS.getContext(), index,
|
AS.getContext(), Index,
|
||||||
AttributeSet::get(AS.getContext(), index, AttrBuilder(attr)));
|
AttributeSet::get(AS.getContext(), Index, AttrBuilder(Attr)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Just skip parameter attributes for now
|
// Just skip parameter attributes for now
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Helper function to place all gc relocates necessary for the given
|
/// Helper function to place all gc relocates necessary for the given
|
||||||
|
Loading…
x
Reference in New Issue
Block a user