[flang-commits] [flang] 4299ab6 - [flang][driver][Revert] Reverts f18 to allow options passed to -W
Arnamoy Bhattacharyya via flang-commits
flang-commits at lists.llvm.org
Thu Apr 22 08:48:27 PDT 2021
Author: Arnamoy Bhattacharyya
Date: 2021-04-22T11:47:48-04:00
New Revision: 4299ab6c5daf62c01a74bef1fe18920dbb13c83e
URL: https://github.com/llvm/llvm-project/commit/4299ab6c5daf62c01a74bef1fe18920dbb13c83e
DIFF: https://github.com/llvm/llvm-project/commit/4299ab6c5daf62c01a74bef1fe18920dbb13c83e.diff
LOG: [flang][driver][Revert] Reverts f18 to allow options passed to -W
Reviewed By: awarzynski
Differential Revision: https://reviews.llvm.org/D100883
Added:
Modified:
flang/test/Driver/werror-wrong.f90
flang/tools/f18/f18.cpp
Removed:
################################################################################
diff --git a/flang/test/Driver/werror-wrong.f90 b/flang/test/Driver/werror-wrong.f90
index 3151bb165dc90..6c18f1663f98e 100644
--- a/flang/test/Driver/werror-wrong.f90
+++ b/flang/test/Driver/werror-wrong.f90
@@ -1,4 +1,5 @@
! Ensure that only argument -Werror is supported.
+! REQUIRES: new-flang-driver
! RUN: not %flang_fc1 -fsyntax-only -Wall %s 2>&1 | FileCheck %s --check-prefix=WRONG
! RUN: not %flang_fc1 -fsyntax-only -WX %s 2>&1 | FileCheck %s --check-prefix=WRONG
diff --git a/flang/tools/f18/f18.cpp b/flang/tools/f18/f18.cpp
index 691d4378928a3..1ea22cef920b2 100644
--- a/flang/tools/f18/f18.cpp
+++ b/flang/tools/f18/f18.cpp
@@ -514,11 +514,6 @@ int main(int argc, char *const argv[]) {
} else if (arg.find("-W") != std::string::npos) {
if (arg == "-Werror")
driver.warningsAreErrors = true;
- else {
- // Only -Werror is supported currently
- llvm::errs() << "Only `-Werror` is supported currently.\n";
- return EXIT_FAILURE;
- }
} else if (arg == "-ed") {
options.features.Enable(Fortran::common::LanguageFeature::OldDebugLines);
} else if (arg == "-E") {
More information about the flang-commits
mailing list