[PATCH] Change final case of Driver::getToolChain to if/else/else/... NFC
Douglas Katzman
dougk at google.com
Fri May 22 08:23:02 PDT 2015
Hi echristo,
http://reviews.llvm.org/D9939
Files:
lib/Driver/Driver.cpp
Index: lib/Driver/Driver.cpp
===================================================================
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -2025,8 +2025,8 @@
const ToolChain &Driver::getToolChain(const ArgList &Args,
StringRef DarwinArchName) const {
- llvm::Triple Target = computeTargetTriple(DefaultTargetTriple, Args,
- DarwinArchName);
+ llvm::Triple Target =
+ computeTargetTriple(DefaultTargetTriple, Args, DarwinArchName);
ToolChain *&TC = ToolChains[Target.str()];
if (!TC) {
@@ -2097,29 +2097,21 @@
}
break;
default:
- // TCE is an OSless target
if (Target.getArchName() == "tce") {
+ // TCE is an OSless target
TC = new toolchains::TCEToolChain(*this, Target, Args);
- break;
- }
- // If Hexagon is configured as an OSless target
- if (Target.getArch() == llvm::Triple::hexagon) {
+ } else if (Target.getArch() == llvm::Triple::hexagon) {
+ // If Hexagon is configured as an OSless target
TC = new toolchains::Hexagon_TC(*this, Target, Args);
- break;
- }
- if (Target.getArch() == llvm::Triple::xcore) {
+ } else if (Target.getArch() == llvm::Triple::xcore) {
TC = new toolchains::XCore(*this, Target, Args);
- break;
- }
- if (Target.isOSBinFormatELF()) {
+ } else if (Target.isOSBinFormatELF()) {
TC = new toolchains::Generic_ELF(*this, Target, Args);
- break;
- }
- if (Target.isOSBinFormatMachO()) {
+ } else if (Target.isOSBinFormatMachO()) {
TC = new toolchains::MachO(*this, Target, Args);
- break;
+ } else {
+ TC = new toolchains::Generic_GCC(*this, Target, Args);
}
- TC = new toolchains::Generic_GCC(*this, Target, Args);
break;
}
}
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9939.26326.patch
Type: text/x-patch
Size: 1898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150522/76e77ecd/attachment.bin>
More information about the llvm-commits
mailing list