[PATCH] D130230: [llvm][IROutliner] Account for return void in sort comparator

Andrew Litteken via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 08:37:48 PDT 2022


AndrewLitteken accepted this revision.
AndrewLitteken added a comment.
This revision is now accepted and ready to land.

LGTM with small nit.



================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:175
+  if (SortedKeys.size() == 1)
+    assert(!SortedKeys[0] && "Expected a single void value.");
+  else {
----------------
small nit, you could add an early return here, and then remove the else statement.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130230/new/

https://reviews.llvm.org/D130230



More information about the llvm-commits mailing list