[PATCH] D113301: [NFC][llvm-libtool-darwin]Remove unnecessary conditionals around errors.

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 5 13:39:55 PDT 2021


alexander-shaposhnikov added inline comments.


================
Comment at: llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp:508
     llvm::stable_sort(*Slices);
-    if (Error E = writeUniversalBinary(*Slices, OutputFile))
-      return E;
+    return writeUniversalBinary(*Slices, OutputFile);
   }
----------------
drodriguez wrote:
> For this last case, if you want to remove the `else` branch, I think it will fit more with the code style: https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
yeah, i think this 'else' should be removed


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113301



More information about the llvm-commits mailing list