forked from OSchip/llvm-project
[mlir] Remove no-op array assignment in dictionaryAttrSort().
Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D99954
This commit is contained in:
parent
ceec610754
commit
fcc5755878
|
@ -79,11 +79,9 @@ static bool dictionaryAttrSort(ArrayRef<NamedAttribute> value,
|
|||
storage.assign(value.begin(), value.end());
|
||||
// Check to see they are sorted already.
|
||||
bool isSorted = llvm::is_sorted(value);
|
||||
if (!isSorted) {
|
||||
// If not, do a general sort.
|
||||
// If not, do a general sort.
|
||||
if (!isSorted)
|
||||
llvm::array_pod_sort(storage.begin(), storage.end());
|
||||
value = storage;
|
||||
}
|
||||
return !isSorted;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue