[PATCH] D117297: [flang] Fix a bug in the `flang` wrapper script

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 14 02:50:55 PST 2022


awarzynski created this revision.
awarzynski added a reviewer: sscalpone.
Herald added a project: Flang.
awarzynski requested review of this revision.
Herald added subscribers: llvm-commits, jdoerfert.
Herald added a project: LLVM.

Please see
https://github.com/flang-compiler/f18-llvm-project/issues/1344#issuecomment-1012706527
for context and the discussion.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117297

Files:
  flang/tools/f18/flang


Index: flang/tools/f18/flang
===================================================================
--- flang/tools/f18/flang
+++ flang/tools/f18/flang
@@ -30,8 +30,9 @@
 
 # === check_bash_version ======================================================
 #
-# Checks the Bash version that's used to run this script. Exits immediately if
-# it's lower than 4.4
+# Checks the Bash version that's used to run this script. Exits immediately
+# with a non-zero return code if it's lower than 4.4. Otherwise returns 0
+# (success).
 # =============================================================================
 check_bash_version() {
   message="Error: Your Bash is too old. Please use Bash >= 4.4"
@@ -42,6 +43,8 @@
   if [[ "${BASH_VERSINFO[0]}" == 4 ]]; then
     [[ "${BASH_VERSINFO[1]:-0}" -lt 4 ]] && echo $message && exit 1
   fi
+
+  return 0
 }
 
 # === parse_args ==============================================================


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117297.399943.patch
Type: text/x-patch
Size: 930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220114/d81fc442/attachment.bin>


More information about the llvm-commits mailing list