Skip to content

Commit

Permalink
[Flang] Allow compile *.f03, *.f08 file
Browse files Browse the repository at this point in the history
Fix issue [#61260](#61260)

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D145845
  • Loading branch information
Shao-Ce SUN committed Mar 11, 2023
1 parent e554cec commit 171794d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clang/lib/Driver/Types.cpp
Expand Up @@ -331,6 +331,10 @@ types::ID types::lookupTypeForExtension(llvm::StringRef Ext) {
.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)
Expand Down
5 changes: 5 additions & 0 deletions 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
5 changes: 5 additions & 0 deletions 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

0 comments on commit 171794d

Please sign in to comment.