[PATCH] IsIntegratedAssemblerDefault() Use switch statement
Brad Smith
brad at comstyle.com
Wed Aug 13 22:26:17 PDT 2014
Use a switch statement for IsIntegratedAssemblerDefault().
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
-------------- next part --------------
Index: ToolChains.h
===================================================================
--- ToolChains.h (revision 215615)
+++ ToolChains.h (working copy)
@@ -543,11 +543,14 @@
}
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:
@@ -592,10 +595,13 @@
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