File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -678,16 +678,16 @@ LogicalResult OpToOpPassAdaptor::tryMergeInto(MLIRContext *ctx,
678678 mgrs.clear ();
679679
680680 // After coalescing, sort the pass managers within rhs by name.
681- auto compareFn = [](const OpPassManager * lhs, const OpPassManager * rhs) {
681+ auto compareFn = [](const OpPassManager & lhs, const OpPassManager & rhs) {
682682 // Order op-specific pass managers first and op-agnostic pass managers last.
683- if (std::optional<StringRef> lhsName = lhs-> getOpName ()) {
684- if (std::optional<StringRef> rhsName = rhs-> getOpName ())
685- return lhsName-> compare ( *rhsName) ;
686- return - 1 ; // lhs(op-specific) < rhs(op-agnostic)
683+ if (std::optional<StringRef> lhsName = lhs. getOpName ()) {
684+ if (std::optional<StringRef> rhsName = rhs. getOpName ())
685+ return * lhsName < *rhsName;
686+ return true ; // lhs(op-specific) < rhs(op-agnostic)
687687 }
688- return 1 ; // lhs(op-agnostic) > rhs(op-specific)
688+ return false ; // lhs(op-agnostic) > rhs(op-specific)
689689 };
690- llvm::array_pod_sort (rhs.mgrs .begin (), rhs.mgrs .end (), compareFn);
690+ std::sort (rhs.mgrs .begin (), rhs.mgrs .end (), compareFn);
691691 return success ();
692692}
693693
You can’t perform that action at this time.
0 commit comments