[cfe-commits] r128433 - in /cfe/trunk: include/clang/Driver/CC1Options.td include/clang/Frontend/CodeGenOptions.h lib/CodeGen/BackendUtil.cpp lib/Driver/Tools.cpp lib/Frontend/CompilerInvocation.cpp
Daniel Dunbar
daniel at zuster.org
Mon Mar 28 15:49:28 PDT 2011
Author: ddunbar
Date: Mon Mar 28 17:49:28 2011
New Revision: 128433
URL: http://llvm.org/viewvc/llvm-project?rev=128433&view=rev
Log:
Integrated-As: Support -Wa,-L when using the integrated assembler.
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Frontend/CodeGenOptions.h
cfe/trunk/lib/CodeGen/BackendUtil.cpp
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=128433&r1=128432&r2=128433&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Mon Mar 28 17:49:28 2011
@@ -160,7 +160,9 @@
def mregparm : Separate<"-mregparm">,
HelpText<"Limit the number of registers available for integer arguments">;
def mrelax_all : Flag<"-mrelax-all">,
- HelpText<"Relax all machine instructions">;
+ HelpText<"(integrated-as) Relax all machine instructions">;
+def msave_temp_labels : Flag<"-msave-temp-labels">,
+ HelpText<"(integrated-as) Save temporary labels">;
def mrtd: Flag<"-mrtd">,
HelpText<"Make StdCall calling convention the default">;
def mrelocation_model : Separate<"-mrelocation-model">,
Modified: cfe/trunk/include/clang/Frontend/CodeGenOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.h?rev=128433&r1=128432&r2=128433&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.h Mon Mar 28 17:49:28 2011
@@ -77,6 +77,7 @@
unsigned OptimizeSize : 1; /// If -Os is specified.
unsigned RelaxAll : 1; /// Relax all machine code instructions.
unsigned RelaxedAliasing : 1; /// Set when -fno-strict-aliasing is enabled.
+ unsigned SaveTempLabels : 1; /// Save temporary labels.
unsigned SimplifyLibCalls : 1; /// Set when -fbuiltin is enabled.
unsigned SoftFloat : 1; /// -soft-float.
unsigned TimePasses : 1; /// Set when -ftime-report is enabled.
@@ -154,6 +155,7 @@
OptimizeSize = 0;
RelaxAll = 0;
RelaxedAliasing = 0;
+ SaveTempLabels = 0;
SimplifyLibCalls = 1;
SoftFloat = 0;
TimePasses = 0;
Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=128433&r1=128432&r2=128433&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Mon Mar 28 17:49:28 2011
@@ -268,6 +268,8 @@
if (CodeGenOpts.RelaxAll)
TM->setMCRelaxAll(true);
+ if (CodeGenOpts.SaveTempLabels)
+ TM->setMCSaveTempLabels(true);
// Create the code generator passes.
PassManager *PM = getCodeGenPasses();
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=128433&r1=128432&r2=128433&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Mar 28 17:49:28 2011
@@ -950,10 +950,7 @@
if (Value == "-force_cpusubtype_ALL") {
// Do nothing, this is the default and we don't support anything else.
} else if (Value == "-L") {
- // We don't support -L yet, but it isn't important enough to error
- // on. No one should really be using it for a semantic change.
- D.Diag(clang::diag::warn_drv_unsupported_option_argument)
- << A->getOption().getName() << Value;
+ CmdArgs.push_back("-msave-temp-labels");
} else {
D.Diag(clang::diag::err_drv_unsupported_option_argument)
<< A->getOption().getName() << Value;
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=128433&r1=128432&r2=128433&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Mon Mar 28 17:49:28 2011
@@ -197,6 +197,8 @@
}
if (Opts.RelaxAll)
Res.push_back("-mrelax-all");
+ if (Opts.SaveTempLabels)
+ Res.push_back("-msave-temp-labels");
if (Opts.SoftFloat)
Res.push_back("-msoft-float");
if (Opts.UnwindTables)
@@ -935,6 +937,7 @@
Opts.NumRegisterParameters = Args.getLastArgIntValue(OPT_mregparm, 0, Diags);
Opts.RelaxAll = Args.hasArg(OPT_mrelax_all);
Opts.OmitLeafFramePointer = Args.hasArg(OPT_momit_leaf_frame_pointer);
+ Opts.SaveTempLabels = Args.hasArg(OPT_msave_temp_labels);
Opts.SoftFloat = Args.hasArg(OPT_msoft_float);
Opts.UnsafeFPMath = Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
Args.hasArg(OPT_cl_fast_relaxed_math);
More information about the cfe-commits
mailing list