[flang-commits] [flang] ad64355 - [flang] Fix a bug in the `flang` wrapper script
Andrzej Warzynski via flang-commits
flang-commits at lists.llvm.org
Fri Jan 14 08:09:38 PST 2022
Author: Andrzej Warzynski
Date: 2022-01-14T16:08:02Z
New Revision: ad643550a529b28e8f50892961f57b0311681603
URL: https://github.com/llvm/llvm-project/commit/ad643550a529b28e8f50892961f57b0311681603
DIFF: https://github.com/llvm/llvm-project/commit/ad643550a529b28e8f50892961f57b0311681603.diff
LOG: [flang] Fix a bug in the `flang` wrapper script
Please see
https://github.com/flang-compiler/f18-llvm-project/issues/1344#issuecomment-1012706527
for context and the discussion.
Differential Revision: https://reviews.llvm.org/D117297
Added:
Modified:
flang/tools/f18/flang
Removed:
################################################################################
diff --git a/flang/tools/f18/flang b/flang/tools/f18/flang
index 3434bd3e60a4c..10b055b098792 100755
--- a/flang/tools/f18/flang
+++ b/flang/tools/f18/flang
@@ -30,8 +30,9 @@ PRINT_VERSION="False"
# === 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 @@ check_bash_version() {
if [[ "${BASH_VERSINFO[0]}" == 4 ]]; then
[[ "${BASH_VERSINFO[1]:-0}" -lt 4 ]] && echo $message && exit 1
fi
+
+ return 0
}
# === parse_args ==============================================================
More information about the flang-commits
mailing list