[clang] 4b6597f - Make flang driver stuff work on macOS

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 04:34:51 PDT 2019


Author: Nico Weber
Date: 2019-10-31T07:34:32-04:00
New Revision: 4b6597f49896529170fde38f5d5fb46d687e0c71

URL: https://github.com/llvm/llvm-project/commit/4b6597f49896529170fde38f5d5fb46d687e0c71
DIFF: https://github.com/llvm/llvm-project/commit/4b6597f49896529170fde38f5d5fb46d687e0c71.diff

LOG: Make flang driver stuff work on macOS

6bf55804 added special-case code for TY_PP_Fortran to
ToolChain::LookupTypeForExtension(), but
Darwin::LookupTypeForExtension() overrode that method without calling
the superclass implementation.

Make it call the superclass implementation to fix things.

Differential Revision: https://reviews.llvm.org/D69636

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/Darwin.cpp
    clang/test/Driver/flang/flang.f90

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index ee08b8208d93..cb76fb0da18a 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -737,7 +737,7 @@ Darwin::Darwin(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
       CudaInstallation(D, Triple, Args) {}
 
 types::ID MachO::LookupTypeForExtension(StringRef Ext) const {
-  types::ID Ty = types::lookupTypeForExtension(Ext);
+  types::ID Ty = ToolChain::lookupTypeForExtension(Ext);
 
   // Darwin always preprocesses assembly files (unless -x is used explicitly).
   if (Ty == types::TY_PP_Asm)

diff  --git a/clang/test/Driver/flang/flang.f90 b/clang/test/Driver/flang/flang.f90
index 97e4847f8439..9d47c7c90225 100644
--- a/clang/test/Driver/flang/flang.f90
+++ b/clang/test/Driver/flang/flang.f90
@@ -1,7 +1,3 @@
-! D63607 made mac builders unhappy by failing this test, and it isn't
-! yet obvious why. Mark as unsupported as a temporary measure.
-! UNSUPPORTED: darwin
-
 ! Check that flang -fc1 is invoked when in --driver-mode=flang.
 
 ! This is a copy of flang_ucase.F90 because the driver has logic in it which


        


More information about the cfe-commits mailing list