Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f8c8e2a

Browse files
committedJul 5, 2023
Change plugin sorting comparisson to be asymetric.
1 parent cf9e11a commit f8c8e2a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/thorin/transform/plugin_execute.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ void plugin_execute(World& world) {
2828
break;
2929

3030
sort(plugin_intrinsics.begin(), plugin_intrinsics.end(), [&](const Continuation* a, const Continuation* b) {
31-
const Continuation* depends = a;
31+
const Continuation* depends = b;
3232
while (depends) {
33-
if (depends == b) return false;
3433
depends = depends->attributes().depends;
34+
if (a == depends) return true;
3535
}
36-
return true;
36+
return false;
3737
});
3838

3939
for (auto cont : plugin_intrinsics) {

0 commit comments

Comments
 (0)
Please sign in to comment.