parent
3e2b335903
commit
9cf7bc7a6c
|
@ -29,6 +29,10 @@ def I : JoinedOrSeparate<"-I">, MetaVarName<"<directory>">,
|
||||||
HelpText<"Add directory to include search path">;
|
HelpText<"Add directory to include search path">;
|
||||||
def n : Flag<"-n">,
|
def n : Flag<"-n">,
|
||||||
HelpText<"Don't automatically start assembly file with a text section">;
|
HelpText<"Don't automatically start assembly file with a text section">;
|
||||||
|
def L : Flag<"-L">,
|
||||||
|
HelpText<"Save temporary labels in the symbol table. "
|
||||||
|
"Note this may change .s semantics, it should almost never be used "
|
||||||
|
"on compiler generated code!">;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Frontend Options
|
// Frontend Options
|
||||||
|
@ -72,4 +76,4 @@ def relax_all : Flag<"-relax-all">,
|
||||||
HelpText<"Relax all fixups (for performance testing)">;
|
HelpText<"Relax all fixups (for performance testing)">;
|
||||||
|
|
||||||
def no_exec_stack : Flag<"--noexecstack">,
|
def no_exec_stack : Flag<"--noexecstack">,
|
||||||
HelpText<"Mark the file as not needing an executable stack">;
|
HelpText<"Mark the file as not needing an executable stack">;
|
||||||
|
|
|
@ -71,6 +71,7 @@ struct AssemblerInvocation {
|
||||||
|
|
||||||
std::vector<std::string> IncludePaths;
|
std::vector<std::string> IncludePaths;
|
||||||
unsigned NoInitialTextSection : 1;
|
unsigned NoInitialTextSection : 1;
|
||||||
|
unsigned SaveTemporaryLabels : 1;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
/// @name Frontend Options
|
/// @name Frontend Options
|
||||||
|
@ -156,6 +157,7 @@ void AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
|
||||||
// Language Options
|
// Language Options
|
||||||
Opts.IncludePaths = Args->getAllArgValues(OPT_I);
|
Opts.IncludePaths = Args->getAllArgValues(OPT_I);
|
||||||
Opts.NoInitialTextSection = Args->hasArg(OPT_n);
|
Opts.NoInitialTextSection = Args->hasArg(OPT_n);
|
||||||
|
Opts.SaveTemporaryLabels = Args->hasArg(OPT_L);
|
||||||
|
|
||||||
// Frontend Options
|
// Frontend Options
|
||||||
if (Args->hasArg(OPT_INPUT)) {
|
if (Args->hasArg(OPT_INPUT)) {
|
||||||
|
@ -265,6 +267,8 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, Diagnostic &Diags) {
|
||||||
|
|
||||||
const TargetAsmInfo *tai = new TargetAsmInfo(*TM);
|
const TargetAsmInfo *tai = new TargetAsmInfo(*TM);
|
||||||
MCContext Ctx(*MAI, tai);
|
MCContext Ctx(*MAI, tai);
|
||||||
|
if (Opts.SaveTemporaryLabels)
|
||||||
|
Ctx.setAllowTemporaryLabels(false);
|
||||||
|
|
||||||
OwningPtr<MCStreamer> Str;
|
OwningPtr<MCStreamer> Str;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue