[PATCH] D72050: [opt] refactor opt main function

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 1 16:20:27 PST 2020


MaskRay added inline comments.


================
Comment at: llvm/tools/opt/opt.cpp:693
   if (PassPipeline.getNumOccurrences() > 0) {
-    OutputKind OK = OK_NoOutput;
-    if (!NoOutput)
----------------
`GetOutputKind` is only called once. The change does not seem to improve readability.


================
Comment at: llvm/tools/opt/opt.cpp:944
+    case OK_NoOutput:
+      assert(false);
+      break;
----------------
llvm_unreachable


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

https://reviews.llvm.org/D72050





More information about the llvm-commits mailing list