]> granicus.if.org Git - clang/commitdiff
Fix up fallout from r187156.
authorBob Wilson <bob.wilson@apple.com>
Thu, 26 Sep 2013 21:00:51 +0000 (21:00 +0000)
committerBob Wilson <bob.wilson@apple.com>
Thu, 26 Sep 2013 21:00:51 +0000 (21:00 +0000)
The previous change caused the driver to translate -Wa,-L to the
-msave-temp-labels option for cc1as, but cc1as did not accept that option.
This patch follows the same approach used for similar options (-relax-all,
-noexecstack) in the previous patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191458 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/CC1AsOptions.td
test/Driver/integrated-as.s
tools/driver/cc1as_main.cpp

index baa769156dce924e760efe225262e097045e03c6..b536724f24255b6f8ea079a342982ca690966795 100644 (file)
@@ -33,7 +33,7 @@ def I : JoinedOrSeparate<["-"], "I">, MetaVarName<"<directory>">,
   HelpText<"Add directory to include search path">;
 def n : Flag<["-"], "n">,
   HelpText<"Don't automatically start assembly file with a text section">;
-def L : Flag<["-"], "L">,
+def msave_temp_labels : Flag<["-"], "msave-temp-labels">,
   HelpText<"Save temporary labels in the symbol table. "
            "Note this may change .s semantics, it should almost never be used "
            "on compiler generated code!">;
index c168f67b46c6334bbd06507fad304a9bab06c214..51ce31cc51fe3939b5fbe94176a8a57028ff0391 100644 (file)
@@ -1,8 +1,10 @@
 // RUN: %clang -### -c -integrated-as %s 2>&1 | FileCheck %s
-
 // CHECK: cc1as
 // CHECK-NOT: -relax-all
 
+// RUN: %clang -### -c -integrated-as -Wa,-L %s 2>&1 | FileCheck --check-prefix=OPT_L %s
+// OPT_L: msave-temp-labels
+
 // RUN: not %clang -c -integrated-as -Wa,--compress-debug-sections %s 2>&1 | FileCheck --check-prefix=INVALID %s
 // INVALID: error: unsupported argument '--compress-debug-sections' to option 'Wa,'
 
index 80ab1ab22e99fdd169eedc2abc0719e1ff1723f8..31cd236b84ce91b771fe1b2ebb76881220f3c13e 100644 (file)
@@ -184,7 +184,7 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
   // Language Options
   Opts.IncludePaths = Args->getAllArgValues(OPT_I);
   Opts.NoInitialTextSection = Args->hasArg(OPT_n);
-  Opts.SaveTemporaryLabels = Args->hasArg(OPT_L);
+  Opts.SaveTemporaryLabels = Args->hasArg(OPT_msave_temp_labels);
   Opts.GenDwarfForAssembly = Args->hasArg(OPT_g);
   Opts.DwarfDebugFlags = Args->getLastArgValue(OPT_dwarf_debug_flags);
   Opts.DwarfDebugProducer = Args->getLastArgValue(OPT_dwarf_debug_producer);