The existing code has unnecessary logic to indirectly pass
errors through function calls. This diff gets rid of the fluff.
Test Plan: Existing unit tests
| Paths 
 |  Differential  D113301  
[NFC][llvm-libtool-darwin]Remove unnecessary conditionals around errors. ClosedPublic Authored by Roger on Nov 5 2021, 10:48 AM. 
Details Summary The existing code has unnecessary logic to indirectly pass Test Plan: Existing unit tests 
Diff Detail 
 Event TimelineRoger retitled this revision from Remove unnecessary conditionals around errors. to [NFC][llvm-libtool-darwin]Remove unnecessary conditionals around errors..Nov 5 2021, 10:48 AM Roger added a child revision: D113127: [NFC][llvm-libtool-darwin] Encapsulate the process of adding a new member in a class. Roger added a child revision: D113215: [NFC][llvm-libtool-darwin] Clean up names.Nov 5 2021, 11:48 AM Roger removed a child revision: D113127: [NFC][llvm-libtool-darwin] Encapsulate the process of adding a new member in a class. drodriguez added inline comments. 
 This revision is now accepted and ready to land.Nov 5 2021, 1:15 PM 
 This revision was landed with ongoing or failed builds.Nov 8 2021, 10:34 AM Closed by commit rGc51f947a1351: [NFC][llvm-libtool-darwin] Remove unnecessary conditionals around errors (authored by Roger, committed by smeenai).  ·  Explain Why This revision was automatically updated to reflect the committed changes. 
Revision Contents 
Diff 385557 llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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