[cfe-commits] r111921 - /cfe/trunk/lib/Driver/Tools.cpp
Daniel Dunbar
daniel at zuster.org
Tue Aug 24 09:47:50 PDT 2010
Author: ddunbar
Date: Tue Aug 24 11:47:49 2010
New Revision: 111921
URL: http://llvm.org/viewvc/llvm-project?rev=111921&view=rev
Log:
Driver/Clang: Forward -Wa, and -Xassembler to clang -cc1 when using the
integrated assembler. For now this mostly just means that we will error out if
someone tries to use this mechanism to send an argument to the assembler.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=111921&r1=111920&r2=111921&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Aug 24 11:47:49 2010
@@ -708,6 +708,11 @@
options::OPT_mno_relax_all,
!IsOpt))
CmdArgs.push_back("-mrelax-all");
+
+ // When using an integrated assembler, we send -Wa, and -Xassembler options
+ // to -cc1.
+ Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
+ options::OPT_Xassembler);
} else if (isa<PrecompileJobAction>(JA)) {
// Use PCH if the user requested it.
bool UsePCH = D.CCCUsePCH;
@@ -1322,7 +1327,7 @@
CmdArgs.push_back("-fdiagnostics-show-category");
CmdArgs.push_back(A->getValue(Args));
}
-
+
// Color diagnostics are the default, unless the terminal doesn't support
// them.
if (Args.hasFlag(options::OPT_fcolor_diagnostics,
@@ -1337,7 +1342,7 @@
if (!Args.hasFlag(options::OPT_fspell_checking,
options::OPT_fno_spell_checking))
CmdArgs.push_back("-fno-spell-checking");
-
+
if (Arg *A = Args.getLastArg(options::OPT_fshow_overloads_EQ))
A->render(Args, CmdArgs);
@@ -1426,7 +1431,7 @@
for (ArgList::const_iterator it = Args.begin(),
ie = Args.end(); it != ie; ++it)
(*it)->render(Args, OriginalArgs);
-
+
llvm::SmallString<256> Flags;
Flags += Exec;
for (unsigned i = 0, e = OriginalArgs.size(); i != e; ++i) {
More information about the cfe-commits
mailing list