summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-03-18 17:58:22 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-03-18 17:58:22 +0000
commit878d2da6ab3121cdde7852f8b347eb42718272cc (patch)
treea33c28f7d4d4ae6e5a26cc11546b8d0bc43b207a
parent248e219760ee5e2f40ac44db747a32fa20a49193 (diff)
downloadbcm5719-llvm-878d2da6ab3121cdde7852f8b347eb42718272cc.tar.gz
bcm5719-llvm-878d2da6ab3121cdde7852f8b347eb42718272cc.zip
Inline ShouldUseIntegratedAssembler and move the documentation to
useIntegratedAs. llvm-svn: 177300
-rw-r--r--clang/include/clang/Driver/ToolChain.h1
-rw-r--r--clang/lib/Driver/Tools.cpp13
2 files changed, 4 insertions, 10 deletions
diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h
index b04dbe61987..32b739dc635 100644
--- a/clang/include/clang/Driver/ToolChain.h
+++ b/clang/include/clang/Driver/ToolChain.h
@@ -137,6 +137,7 @@ public:
/// by default.
virtual bool IsIntegratedAssemblerDefault() const { return false; }
+ /// \brief Check if the toolchain should use the integrated assembler.
bool useIntegratedAs(const ArgList &Args) const;
/// IsStrictAliasingDefault - Does this tool chain use -fstrict-aliasing by
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 96d10f53aed..a53e9f8147e 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -1414,20 +1414,13 @@ static void addExceptionArgs(const ArgList &Args, types::ID InputType,
CmdArgs.push_back("-fexceptions");
}
-/// \brief Check if the toolchain should use the integrated assembler.
-static bool ShouldUseIntegratedAssembler(const ArgList &Args,
- const ToolChain &TC) {
- // FIXME: inline
- return TC.useIntegratedAs(Args);
-}
-
static bool ShouldDisableCFI(const ArgList &Args,
const ToolChain &TC) {
bool Default = true;
if (TC.getTriple().isOSDarwin()) {
// The native darwin assembler doesn't support cfi directives, so
// we disable them if we think the .s file will be passed to it.
- Default = ShouldUseIntegratedAssembler(Args, TC);
+ Default = TC.useIntegratedAs(Args);
}
return !Args.hasFlag(options::OPT_fdwarf2_cfi_asm,
options::OPT_fno_dwarf2_cfi_asm,
@@ -1438,7 +1431,7 @@ static bool ShouldDisableDwarfDirectory(const ArgList &Args,
const ToolChain &TC) {
bool UseDwarfDirectory = Args.hasFlag(options::OPT_fdwarf_directory_asm,
options::OPT_fno_dwarf_directory_asm,
- ShouldUseIntegratedAssembler(Args, TC));
+ TC.useIntegratedAs(Args));
return !UseDwarfDirectory;
}
@@ -2813,7 +2806,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// -fmodules-autolink (on by default when modules is enabled) automatically
// links against libraries for imported modules. This requires the
// integrated assembler.
- if (HaveModules && ShouldUseIntegratedAssembler(Args, getToolChain()) &&
+ if (HaveModules && getToolChain().useIntegratedAs(Args) &&
Args.hasFlag(options::OPT_fmodules_autolink,
options::OPT_fno_modules_autolink,
true)) {
OpenPOWER on IntegriCloud