From: Fangrui Song Date: Fri, 12 Jul 2019 13:21:58 +0000 (+0000) Subject: [Driver] Delete dead code X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddd4b189b464a6a09a0925e429e15ce4a931e669;p=clang [Driver] Delete dead code git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365898 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/ToolChains/Arch/Mips.cpp b/lib/Driver/ToolChains/Arch/Mips.cpp index d506796a36..b512ff64b0 100644 --- a/lib/Driver/ToolChains/Arch/Mips.cpp +++ b/lib/Driver/ToolChains/Arch/Mips.cpp @@ -246,7 +246,6 @@ void mips::getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple, if (IsN64 && NonPIC && (!ABICallsArg || UseAbiCalls)) { D.Diag(diag::warn_drv_unsupported_pic_with_mabicalls) << LastPICArg->getAsString(Args) << (!ABICallsArg ? 0 : 1); - NonPIC = false; } if (ABICallsArg && !UseAbiCalls && IsPIC) { diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp index 719123fdc3..a1fe39eab2 100644 --- a/lib/Driver/ToolChains/Clang.cpp +++ b/lib/Driver/ToolChains/Clang.cpp @@ -3448,19 +3448,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } const llvm::Triple *AuxTriple = IsCuda ? TC.getAuxTriple() : nullptr; - bool IsWindowsGNU = RawTriple.isWindowsGNUEnvironment(); - bool IsWindowsCygnus = RawTriple.isWindowsCygwinEnvironment(); bool IsWindowsMSVC = RawTriple.isWindowsMSVCEnvironment(); bool IsIAMCU = RawTriple.isOSIAMCU(); // Adjust IsWindowsXYZ for CUDA/HIP compilations. Even when compiling in // device mode (i.e., getToolchain().getTriple() is NVPTX/AMDGCN, not // Windows), we need to pass Windows-specific flags to cc1. - if (IsCuda || IsHIP) { + if (IsCuda || IsHIP) IsWindowsMSVC |= AuxTriple && AuxTriple->isWindowsMSVCEnvironment(); - IsWindowsGNU |= AuxTriple && AuxTriple->isWindowsGNUEnvironment(); - IsWindowsCygnus |= AuxTriple && AuxTriple->isWindowsCygwinEnvironment(); - } // C++ is not supported for IAMCU. if (IsIAMCU && types::isCXX(Input.getType()))