[PATCH] D145845: [Flang] Allow compile *.f03, *.f08 file

Shao-Ce SUN via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 11 07:23:32 PST 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
sunshaoce marked an inline comment as done.
Closed by commit rG171794de533b: [Flang] Allow compile *.f03, *.f08 file (authored by sunshaoce).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145845

Files:
  clang/lib/Driver/Types.cpp
  flang/test/Driver/supported-suffices/f03-suffix.f03
  flang/test/Driver/supported-suffices/f08-suffix.f08


Index: flang/test/Driver/supported-suffices/f08-suffix.f08
===================================================================
--- /dev/null
+++ flang/test/Driver/supported-suffices/f08-suffix.f08
@@ -0,0 +1,5 @@
+! RUN: %flang -### %s 2>&1 | FileCheck %s
+
+! CHECK: "{{.*}}flang-new" "-fc1" {{.*}} "/tmp/{{.*}}.o"
+program f08
+end program f08
Index: flang/test/Driver/supported-suffices/f03-suffix.f03
===================================================================
--- /dev/null
+++ flang/test/Driver/supported-suffices/f03-suffix.f03
@@ -0,0 +1,5 @@
+! RUN: %flang -### %s 2>&1 | FileCheck %s
+
+! CHECK: "{{.*}}flang-new" "-fc1" {{.*}} "/tmp/{{.*}}.o"
+program f03
+end program f03
Index: clang/lib/Driver/Types.cpp
===================================================================
--- clang/lib/Driver/Types.cpp
+++ clang/lib/Driver/Types.cpp
@@ -331,6 +331,10 @@
       .Case("cui", TY_PP_CUDA)
       .Case("cxx", TY_CXX)
       .Case("CXX", TY_CXX)
+      .Case("F03", TY_Fortran)
+      .Case("f03", TY_PP_Fortran)
+      .Case("F08", TY_Fortran)
+      .Case("f08", TY_PP_Fortran)
       .Case("F90", TY_Fortran)
       .Case("f90", TY_PP_Fortran)
       .Case("F95", TY_Fortran)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145845.504364.patch
Type: text/x-patch
Size: 1198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230311/81a6f131/attachment-0001.bin>


More information about the cfe-commits mailing list