r223422 - Use isOSBinFormatMachO() instead of comparing the object format
Eric Christopher
echristo at gmail.com
Thu Dec 4 16:22:49 PST 2014
Author: echristo
Date: Thu Dec 4 18:22:48 2014
New Revision: 223422
URL: http://llvm.org/viewvc/llvm-project?rev=223422&view=rev
Log:
Use isOSBinFormatMachO() instead of comparing the object format
against an enum.
Modified:
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=223422&r1=223421&r2=223422&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Thu Dec 4 18:22:48 2014
@@ -2063,7 +2063,7 @@ const ToolChain &Driver::getToolChain(co
TC = new toolchains::Generic_ELF(*this, Target, Args);
break;
}
- if (Target.getObjectFormat() == llvm::Triple::MachO) {
+ if (Target.isOSBinFormatMachO()) {
TC = new toolchains::MachO(*this, Target, Args);
break;
}
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=223422&r1=223421&r2=223422&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Dec 4 18:22:48 2014
@@ -772,8 +772,7 @@ void Clang::AddARMTargetArgs(const ArgLi
// The backend is hardwired to assume AAPCS for M-class processors, ensure
// the frontend matches that.
if (Triple.getEnvironment() == llvm::Triple::EABI ||
- (Triple.getOS() == llvm::Triple::UnknownOS &&
- Triple.getObjectFormat() == llvm::Triple::MachO) ||
+ Triple.getOS() == llvm::Triple::UnknownOS ||
StringRef(CPUName).startswith("cortex-m")) {
ABIName = "aapcs";
} else {
Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=223422&r1=223421&r2=223422&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Thu Dec 4 18:22:48 2014
@@ -467,7 +467,7 @@ void InitHeaderSearch::AddDefaultInclude
case llvm::Triple::Win32:
if (triple.getEnvironment() == llvm::Triple::MSVC ||
triple.getEnvironment() == llvm::Triple::Itanium ||
- triple.getObjectFormat() == llvm::Triple::MachO)
+ triple.isOSBinFormatMachO())
return;
break;
}
More information about the cfe-commits
mailing list