r191458 - Fix up fallout from r187156.

Bob Wilson bob.wilson at apple.com
Thu Sep 26 14:00:52 PDT 2013


Author: bwilson
Date: Thu Sep 26 16:00:51 2013
New Revision: 191458

URL: http://llvm.org/viewvc/llvm-project?rev=191458&view=rev
Log:
Fix up fallout from r187156.

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.

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

Modified: cfe/trunk/include/clang/Driver/CC1AsOptions.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1AsOptions.td?rev=191458&r1=191457&r2=191458&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1AsOptions.td (original)
+++ cfe/trunk/include/clang/Driver/CC1AsOptions.td Thu Sep 26 16:00:51 2013
@@ -33,7 +33,7 @@ def I : JoinedOrSeparate<["-"], "I">, Me
   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!">;

Modified: cfe/trunk/test/Driver/integrated-as.s
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/integrated-as.s?rev=191458&r1=191457&r2=191458&view=diff
==============================================================================
--- cfe/trunk/test/Driver/integrated-as.s (original)
+++ cfe/trunk/test/Driver/integrated-as.s Thu Sep 26 16:00:51 2013
@@ -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,'
 

Modified: cfe/trunk/tools/driver/cc1as_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1as_main.cpp?rev=191458&r1=191457&r2=191458&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Thu Sep 26 16:00:51 2013
@@ -184,7 +184,7 @@ bool AssemblerInvocation::CreateFromArgs
   // 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);





More information about the cfe-commits mailing list