awarzynski created this revision.
Herald added subscribers: usaxena95, kadircet.
awarzynski requested review of this revision.
Herald added subscribers: cfe-commits, ilya-biryukov.
Herald added a project: clang.

This is just a small change in the Flang tool within libclangDriver.
Currently it passes `-triple` when calling `flang-new -fc1` for various
driver Jobs. Eventually these Jobs will require a triple, but currently
Flang doesn't support code-generation. As a consequence, `flang-new
-fc1` doesn't support `-triple.`

This hasn't been a problem as the affected Jobs aren't implemented or
used. However, we will be adding support for them in the near future.
However, while there is no code-generation, `-triple` is not required
and should remain unsupported.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93027

Files:
  clang/lib/Driver/ToolChains/Flang.cpp
  clang/test/Driver/flang/flang.f90
  clang/test/Driver/flang/flang_ucase.F90


Index: clang/test/Driver/flang/flang_ucase.F90
===================================================================
--- clang/test/Driver/flang/flang_ucase.F90
+++ clang/test/Driver/flang/flang_ucase.F90
@@ -23,7 +23,6 @@
 ! CHECK-E-DAG: "-o" "-"
 
 ! RUN: %clang --driver-mode=flang -### -emit-ast           %s 2>&1 | FileCheck 
--check-prefixes=ALL,CHECK-EMIT-AST %s
-! CHECK-EMIT-AST-DAG: "-triple"
 ! CHECK-EMIT-AST-DAG: "-emit-ast"
 ! CHECK-EMIT-AST-DAG: "-o" "{{[^"]*}}.ast"
 
Index: clang/test/Driver/flang/flang.f90
===================================================================
--- clang/test/Driver/flang/flang.f90
+++ clang/test/Driver/flang/flang.f90
@@ -23,7 +23,6 @@
 ! CHECK-E-DAG: "-o" "-"
 
 ! RUN: %clang --driver-mode=flang -### -emit-ast           %s 2>&1 | FileCheck 
--check-prefixes=ALL,CHECK-EMIT-AST %s
-! CHECK-EMIT-AST-DAG: "-triple"
 ! CHECK-EMIT-AST-DAG: "-emit-ast"
 ! CHECK-EMIT-AST-DAG: "-o" "{{[^"]*}}.ast"
 
Index: clang/lib/Driver/ToolChains/Flang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Flang.cpp
+++ clang/lib/Driver/ToolChains/Flang.cpp
@@ -40,8 +40,6 @@
     else
       CmdArgs.push_back("-E");
   } else if (isa<CompileJobAction>(JA) || isa<BackendJobAction>(JA)) {
-    CmdArgs.push_back("-triple");
-    CmdArgs.push_back(Args.MakeArgString(TripleStr));
     if (JA.getType() == types::TY_Nothing) {
       CmdArgs.push_back("-fsyntax-only");
     } else if (JA.getType() == types::TY_AST) {


Index: clang/test/Driver/flang/flang_ucase.F90
===================================================================
--- clang/test/Driver/flang/flang_ucase.F90
+++ clang/test/Driver/flang/flang_ucase.F90
@@ -23,7 +23,6 @@
 ! CHECK-E-DAG: "-o" "-"
 
 ! RUN: %clang --driver-mode=flang -### -emit-ast           %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-AST %s
-! CHECK-EMIT-AST-DAG: "-triple"
 ! CHECK-EMIT-AST-DAG: "-emit-ast"
 ! CHECK-EMIT-AST-DAG: "-o" "{{[^"]*}}.ast"
 
Index: clang/test/Driver/flang/flang.f90
===================================================================
--- clang/test/Driver/flang/flang.f90
+++ clang/test/Driver/flang/flang.f90
@@ -23,7 +23,6 @@
 ! CHECK-E-DAG: "-o" "-"
 
 ! RUN: %clang --driver-mode=flang -### -emit-ast           %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-AST %s
-! CHECK-EMIT-AST-DAG: "-triple"
 ! CHECK-EMIT-AST-DAG: "-emit-ast"
 ! CHECK-EMIT-AST-DAG: "-o" "{{[^"]*}}.ast"
 
Index: clang/lib/Driver/ToolChains/Flang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Flang.cpp
+++ clang/lib/Driver/ToolChains/Flang.cpp
@@ -40,8 +40,6 @@
     else
       CmdArgs.push_back("-E");
   } else if (isa<CompileJobAction>(JA) || isa<BackendJobAction>(JA)) {
-    CmdArgs.push_back("-triple");
-    CmdArgs.push_back(Args.MakeArgString(TripleStr));
     if (JA.getType() == types::TY_Nothing) {
       CmdArgs.push_back("-fsyntax-only");
     } else if (JA.getType() == types::TY_AST) {
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to