]> granicus.if.org Git - clang/commitdiff
Accept -no-integrated-as in -cc1 and forward it to llvm.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 21 Feb 2014 03:14:07 +0000 (03:14 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 21 Feb 2014 03:14:07 +0000 (03:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201837 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/BackendUtil.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/2010-06-17-asmcrash.c
test/Frontend/backend-diagnostic.c

index 82c7c30c335e269cdf156c01418526c3a29e3808..915b502b93d9938fa6104e66f4954f5dca858818 100644 (file)
@@ -1191,7 +1191,7 @@ def mwarn_nonportable_cfstrings : Flag<["-"], "mwarn-nonportable-cfstrings">, Gr
 def no_canonical_prefixes : Flag<["-"], "no-canonical-prefixes">, Flags<[HelpHidden]>,
   HelpText<"Use relative instead of canonical paths">;
 def no_cpp_precomp : Flag<["-"], "no-cpp-precomp">, Group<clang_ignored_f_Group>;
-def no_integrated_as : Flag<["-"], "no-integrated-as">, Flags<[DriverOption]>;
+def no_integrated_as : Flag<["-"], "no-integrated-as">, Flags<[CC1Option, DriverOption]>;
 def no_integrated_cpp : Flag<["-", "--"], "no-integrated-cpp">, Flags<[DriverOption]>;
 def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group<pedantic_Group>;
 def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">;
index 1e81dd2b52658f35d77aed04e90372954a7d1afd..400591a08ac23f2538a0b21abd8892a8683d7937 100644 (file)
@@ -28,6 +28,7 @@ CODEGENOPT(Name, Bits, Default)
 CODEGENOPT(Name, Bits, Default)
 #endif
 
+CODEGENOPT(DisableIntegratedAS, 1, 0) ///< -no-integrated-as
 CODEGENOPT(Autolink          , 1, 1) ///< -fno-autolink
 CODEGENOPT(AsmVerbose        , 1, 0) ///< -dA, -fverbose-asm.
 CODEGENOPT(ObjCAutoRefCountExceptions , 1, 0) ///< Whether ARC should be EH-safe.
index d6d4f47dd689215c3a1103c56d9d7235352d4cd1..3e5ee2cb55535a292a48494ac033e7dd04a2c04e 100644 (file)
@@ -438,6 +438,9 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
 
   llvm::TargetOptions Options;
 
+  if (CodeGenOpts.DisableIntegratedAS)
+    Options.DisableIntegratedAS = true;
+
   // Set frame pointer elimination mode.
   if (!CodeGenOpts.DisableFPElim) {
     Options.NoFramePointerElim = false;
index a058a9c86c146d6353bee37f4d8621ada18323b4..4184847ec51dc816b92f9cb4feb07fb75bcbdd07 100644 (file)
@@ -366,6 +366,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
                    (Opts.OptimizationLevel > 1 && !Opts.OptimizeSize));
   Opts.RerollLoops = Args.hasArg(OPT_freroll_loops);
 
+  Opts.DisableIntegratedAS = Args.hasArg(OPT_no_integrated_as);
   Opts.Autolink = !Args.hasArg(OPT_fno_autolink);
   Opts.SampleProfileFile = Args.getLastArgValue(OPT_fprofile_sample_use_EQ);
   Opts.ProfileInstrGenerate = Args.hasArg(OPT_fprofile_instr_generate);
index f13ef0c77b8b53184ff75f6c6628c9ff2162d299..048e42966127ee6713c5c1a8ebdc2d83eb7e4b91 100644 (file)
@@ -1,5 +1,5 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O1 -mllvm -no-integrated-as \
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O1 -no-integrated-as \
 // RUN:     -S -o - %s | FileCheck %s
 
 typedef long long int64_t;
index 00b3f48757c33652facb170239c9d04bf338c6df..8b61c0350eca2e45cfd39fefb5a8ce2ec7316b89 100644 (file)
@@ -4,17 +4,17 @@
 // _PROMOTE_: Promote warning to error.
 // _IGNORE_: Drop backend warning.
 //
-// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -mllvm -no-integrated-as -S -o - -triple=i386-apple-darwin 2> %t.err
+// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -no-integrated-as -S -o - -triple=i386-apple-darwin 2> %t.err
 // RUN: FileCheck < %t.err %s --check-prefix=REGULAR --check-prefix=ASM
-// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -mllvm -no-integrated-as -S -o - -triple=i386-apple-darwin -Werror=frame-larger-than 2> %t.err
+// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -no-integrated-as -S -o - -triple=i386-apple-darwin -Werror=frame-larger-than 2> %t.err
 // RUN: FileCheck < %t.err %s --check-prefix=PROMOTE --check-prefix=ASM
-// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -mllvm -no-integrated-as -S -o - -triple=i386-apple-darwin -Wno-frame-larger-than 2> %t.err
+// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -no-integrated-as -S -o - -triple=i386-apple-darwin -Wno-frame-larger-than 2> %t.err
 // RUN: FileCheck < %t.err %s --check-prefix=IGNORE --check-prefix=ASM
 //
 // Currently the stack size reporting cannot be checked with -verify because
 //  no source location is attached to the diagnostic. Therefore do not emit
 // them for the -verify test for now.
-// RUN: %clang_cc1 %s -S -o - -triple=i386-apple-darwin -verify -mllvm -no-integrated-as
+// RUN: %clang_cc1 %s -S -o - -triple=i386-apple-darwin -verify -no-integrated-as
 
 extern void doIt(char *);