summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-02-22 23:37:58 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-02-22 23:37:58 +0000
commit42e4b5997a2cad5f505dfb997b83f14f91ef0546 (patch)
tree388b04ad763eedbf8b17b4354ad8ebe9bc04542e /clang/lib
parenta56fc7c42c24557fc7b99057e2579756e7af135e (diff)
downloadbcm5719-llvm-42e4b5997a2cad5f505dfb997b83f14f91ef0546.tar.gz
bcm5719-llvm-42e4b5997a2cad5f505dfb997b83f14f91ef0546.zip
clang: forward -no-integrated-as from the driver
Forward the -no-integrated-as option to -cc1 rather than simply invoking the appropriate tool. This is useful since this option has been overloaded to permit disabling of parsing inline assembly at the MC layer. This re-applies the previous version of the patch with a renaming of the driver option to the public name rather than the internal name (-target vs -triple). The actual failure is fixed separately of an overly aggressive negative pattern match in the MIPS driver tests. It also fixes the incorrect test for targets that have the integrated assembler disabled by default. llvm-svn: 201960
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Driver/Tools.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index b6214a7177c..31192a2b028 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -2514,12 +2514,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// Decide whether to use verbose asm. Verbose assembly is the default on
// toolchains which have the integrated assembler on by default.
- bool IsVerboseAsmDefault = getToolChain().IsIntegratedAssemblerDefault();
+ bool IsIntegratedAssemblerDefault =
+ getToolChain().IsIntegratedAssemblerDefault();
if (Args.hasFlag(options::OPT_fverbose_asm, options::OPT_fno_verbose_asm,
- IsVerboseAsmDefault) ||
+ IsIntegratedAssemblerDefault) ||
Args.hasArg(options::OPT_dA))
CmdArgs.push_back("-masm-verbose");
+ if (!Args.hasFlag(options::OPT_integrated_as, options::OPT_no_integrated_as,
+ IsIntegratedAssemblerDefault))
+ CmdArgs.push_back("-no-integrated-as");
+
if (Args.hasArg(options::OPT_fdebug_pass_structure)) {
CmdArgs.push_back("-mdebug-pass");
CmdArgs.push_back("Structure");
OpenPOWER on IntegriCloud