[PATCH] D95180: [flang][nfc] Fix comments, remove needless API, tweak script

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 15:28:12 PST 2021


tskeith added inline comments.


================
Comment at: flang/tools/f18/flang:18
+then :
+else echo flang: in $PWD, f18 failed with exit status $?: $wd/bin/f18 $opts "$@" >&2
+fi
----------------
This will have exit status 0 even in error cases because echo is the last command. So it should have `exit 1` in the `else` part.

I think it would be clearer without the empty `then` part:
```
if ! $wd/bin/f18 $opts "$@"; then
  echo flang: in $PWD, f18 failed with exit status $?: $wd/bin/f18 $opts "$@" >&2
  exit 1
fi
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95180



More information about the llvm-commits mailing list