diff options
author | Michal Gorny <mgorny@gentoo.org> | 2018-12-20 13:09:30 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2018-12-20 13:09:30 +0000 |
commit | 5a409d0e301849e67beeee5e7d50dc4e931a0f77 (patch) | |
tree | 492417f8ca391d43c9b226d1863dc36bc43beb61 /clang/lib/Driver/ToolChains/Gnu.cpp | |
parent | 22ca9c628a2f2c1421105a48284329d70a4d572d (diff) | |
download | bcm5719-llvm-5a409d0e301849e67beeee5e7d50dc4e931a0f77.tar.gz bcm5719-llvm-5a409d0e301849e67beeee5e7d50dc4e931a0f77.zip |
Replace getOS() == llvm::Triple::*BSD with isOS*BSD() [NFCI]
Replace multiple comparisons of getOS() value with FreeBSD, NetBSD,
OpenBSD and DragonFly with matching isOS*BSD() methods. This should
improve the consistency of coding style without changing the behavior.
Direct getOS() comparisons were left whenever used in switch or switch-
like context.
Differential Revision: https://reviews.llvm.org/D55916
llvm-svn: 349752
Diffstat (limited to 'clang/lib/Driver/ToolChains/Gnu.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains/Gnu.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index fbd4dc72e55..935071f8911 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2597,7 +2597,7 @@ void Generic_ELF::addClangTargetOptions(const ArgList &DriverArgs, bool UseInitArrayDefault = getTriple().getArch() == llvm::Triple::aarch64 || getTriple().getArch() == llvm::Triple::aarch64_be || - (getTriple().getOS() == llvm::Triple::FreeBSD && + (getTriple().isOSFreeBSD() && getTriple().getOSMajorVersion() >= 12) || (getTriple().getOS() == llvm::Triple::Linux && ((!GCCInstallation.isValid() || !V.isOlderThan(4, 7, 0)) || |