From: Bob Wilson Date: Thu, 26 Sep 2013 21:00:51 +0000 (+0000) Subject: Fix up fallout from r187156. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=084be2df33f5ac99ba989b519921014d236aea10;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191458 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/CC1AsOptions.td b/include/clang/Driver/CC1AsOptions.td index baa769156d..b536724f24 100644 --- a/include/clang/Driver/CC1AsOptions.td +++ b/include/clang/Driver/CC1AsOptions.td @@ -33,7 +33,7 @@ def I : JoinedOrSeparate<["-"], "I">, MetaVarName<"">, 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!">; diff --git a/test/Driver/integrated-as.s b/test/Driver/integrated-as.s index c168f67b46..51ce31cc51 100644 --- a/test/Driver/integrated-as.s +++ b/test/Driver/integrated-as.s @@ -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,' diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp index 80ab1ab22e..31cd236b84 100644 --- a/tools/driver/cc1as_main.cpp +++ b/tools/driver/cc1as_main.cpp @@ -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);