Author: Rainer Orth
Date: 2022-08-18T08:28:57+02:00
New Revision: 67ea7a1b114f0168ad97de747440b88e7a984540

URL: 
https://github.com/llvm/llvm-project/commit/67ea7a1b114f0168ad97de747440b88e7a984540
DIFF: 
https://github.com/llvm/llvm-project/commit/67ea7a1b114f0168ad97de747440b88e7a984540.diff

LOG: [flang] Add Solaris/x86 support to Optimizer/CodeGen/Target.cpp

When testing LLVM 15.0.0 rc1 on Solaris, I found that 50+ flang tests
`FAIL`ed with

  error:
/vol/llvm/src/llvm-project/local/flang/lib/Optimizer/CodeGen/Target.cpp:310:
not yet implemented: target not implemented

This patch fixes that for Solaris/x86, where the fix is trivial (just
handling it like the other x86 OSes).

Tested on `amd64-pc-solaris2.11`; only a single failure remains now.

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

(cherry picked from commit bcb2740f415b0f825402f656dda3271414121a0e)

Added: 
    

Modified: 
    flang/lib/Optimizer/CodeGen/Target.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Optimizer/CodeGen/Target.cpp 
b/flang/lib/Optimizer/CodeGen/Target.cpp
index 9ec2f04489aee..5295420ae9a85 100644
--- a/flang/lib/Optimizer/CodeGen/Target.cpp
+++ b/flang/lib/Optimizer/CodeGen/Target.cpp
@@ -268,6 +268,7 @@ fir::CodeGenSpecifics::get(mlir::MLIRContext *ctx, 
llvm::Triple &&trp,
     case llvm::Triple::OSType::Linux:
     case llvm::Triple::OSType::Darwin:
     case llvm::Triple::OSType::MacOSX:
+    case llvm::Triple::OSType::Solaris:
     case llvm::Triple::OSType::Win32:
       return std::make_unique<TargetI386>(ctx, std::move(trp),
                                           std::move(kindMap));
@@ -280,6 +281,7 @@ fir::CodeGenSpecifics::get(mlir::MLIRContext *ctx, 
llvm::Triple &&trp,
     case llvm::Triple::OSType::Linux:
     case llvm::Triple::OSType::Darwin:
     case llvm::Triple::OSType::MacOSX:
+    case llvm::Triple::OSType::Solaris:
     case llvm::Triple::OSType::Win32:
       return std::make_unique<TargetX86_64>(ctx, std::move(trp),
                                             std::move(kindMap));


        
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to