[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 08:19:57 PST 2023
sunshaoce updated this revision to Diff 504372.
sunshaoce added a comment.
Fix the issue of failing in the MSVC environment.
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" {{.*}} "-o" "{{.*}}.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" {{.*}} "-o" "{{.*}}.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.504372.patch
Type: text/x-patch
Size: 1198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230311/a9fddfa0/attachment.bin>
More information about the cfe-commits
mailing list