r215678 - Use a switch statement for IsIntegratedAssemblerDefault().
Brad Smith
brad at comstyle.com
Thu Aug 14 14:43:07 PDT 2014
Author: brad
Date: Thu Aug 14 16:43:07 2014
New Revision: 215678
URL: http://llvm.org/viewvc/llvm-project?rev=215678&view=rev
Log:
Use a switch statement for IsIntegratedAssemblerDefault().
Modified:
cfe/trunk/lib/Driver/ToolChains.h
Modified: cfe/trunk/lib/Driver/ToolChains.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=215678&r1=215677&r2=215678&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.h (original)
+++ cfe/trunk/lib/Driver/ToolChains.h Thu Aug 14 16:43:07 2014
@@ -533,11 +533,14 @@ public:
}
virtual bool IsIntegratedAssemblerDefault() const override {
- if (getTriple().getArch() == llvm::Triple::ppc ||
- getTriple().getArch() == llvm::Triple::sparc ||
- getTriple().getArch() == llvm::Triple::sparcv9)
+ switch (getTriple().getArch()) {
+ case llvm::Triple::ppc:
+ case llvm::Triple::sparc:
+ case llvm::Triple::sparcv9:
return true;
- return Generic_ELF::IsIntegratedAssemblerDefault();
+ default:
+ return Generic_ELF::IsIntegratedAssemblerDefault();
+ }
}
protected:
@@ -582,10 +585,13 @@ public:
AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) const override;
bool IsIntegratedAssemblerDefault() const override {
- if (getTriple().getArch() == llvm::Triple::ppc ||
- getTriple().getArch() == llvm::Triple::ppc64)
+ switch (getTriple().getArch()) {
+ case llvm::Triple::ppc:
+ case llvm::Triple::ppc64:
return true;
- return Generic_ELF::IsIntegratedAssemblerDefault();
+ default:
+ return Generic_ELF::IsIntegratedAssemblerDefault();
+ }
}
bool UseSjLjExceptions() const override;
More information about the cfe-commits
mailing list