mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
Remove the Options query functions and just access our Options directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a9f15ce71f
commit
9364e63d79
@ -162,21 +162,6 @@ public:
|
|||||||
bool requiresStructuredCFG() const { return RequireStructuredCFG; }
|
bool requiresStructuredCFG() const { return RequireStructuredCFG; }
|
||||||
void setRequiresStructuredCFG(bool Value) { RequireStructuredCFG = Value; }
|
void setRequiresStructuredCFG(bool Value) { RequireStructuredCFG = Value; }
|
||||||
|
|
||||||
/// hasMCRelaxAll - Check whether all machine code instructions should be
|
|
||||||
/// relaxed.
|
|
||||||
bool hasMCRelaxAll() const { return Options.MCOptions.MCRelaxAll; }
|
|
||||||
|
|
||||||
/// hasMCSaveTempLabels - Check whether temporary labels will be preserved
|
|
||||||
/// (i.e., not treated as temporary).
|
|
||||||
bool hasMCSaveTempLabels() const { return Options.MCOptions.MCSaveTempLabels; }
|
|
||||||
|
|
||||||
/// hasMCNoExecStack - Check whether an executable stack is not needed.
|
|
||||||
bool hasMCNoExecStack() const { return Options.MCOptions.MCNoExecStack; }
|
|
||||||
|
|
||||||
/// hasMCUseDwarfDirectory - Check whether we should use .file directives with
|
|
||||||
/// explicit directories.
|
|
||||||
bool hasMCUseDwarfDirectory() const { return Options.MCOptions.MCUseDwarfDirectory; }
|
|
||||||
|
|
||||||
/// getRelocationModel - Returns the code generation relocation model. The
|
/// getRelocationModel - Returns the code generation relocation model. The
|
||||||
/// choices are static, PIC, and dynamic-no-pic, and target default.
|
/// choices are static, PIC, and dynamic-no-pic, and target default.
|
||||||
Reloc::Model getRelocationModel() const;
|
Reloc::Model getRelocationModel() const;
|
||||||
|
@ -164,7 +164,7 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasMCSaveTempLabels())
|
if (Options.MCOptions.MCSaveTempLabels)
|
||||||
Context->setAllowTemporaryLabels(false);
|
Context->setAllowTemporaryLabels(false);
|
||||||
|
|
||||||
const MCAsmInfo &MAI = *getMCAsmInfo();
|
const MCAsmInfo &MAI = *getMCAsmInfo();
|
||||||
@ -187,8 +187,8 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
|||||||
MCAsmBackend *MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(),
|
MCAsmBackend *MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(),
|
||||||
TargetCPU);
|
TargetCPU);
|
||||||
MCStreamer *S = getTarget().createAsmStreamer(
|
MCStreamer *S = getTarget().createAsmStreamer(
|
||||||
*Context, Out, getVerboseAsm(), hasMCUseDwarfDirectory(), InstPrinter,
|
*Context, Out, getVerboseAsm(), Options.MCOptions.MCUseDwarfDirectory,
|
||||||
MCE, MAB, Options.MCOptions.ShowMCInst);
|
InstPrinter, MCE, MAB, Options.MCOptions.ShowMCInst);
|
||||||
AsmStreamer.reset(S);
|
AsmStreamer.reset(S);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -203,8 +203,8 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
AsmStreamer.reset(getTarget().createMCObjectStreamer(
|
AsmStreamer.reset(getTarget().createMCObjectStreamer(
|
||||||
getTargetTriple(), *Context, *MAB, Out, MCE, STI, hasMCRelaxAll(),
|
getTargetTriple(), *Context, *MAB, Out, MCE, STI,
|
||||||
hasMCNoExecStack()));
|
Options.MCOptions.MCRelaxAll, Options.MCOptions.MCNoExecStack));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CGFT_Null:
|
case CGFT_Null:
|
||||||
@ -261,7 +261,7 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM,
|
|||||||
if (!Ctx)
|
if (!Ctx)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (hasMCSaveTempLabels())
|
if (Options.MCOptions.MCSaveTempLabels)
|
||||||
Ctx->setAllowTemporaryLabels(false);
|
Ctx->setAllowTemporaryLabels(false);
|
||||||
|
|
||||||
// Create the code emitter for the target if it exists. If not, .o file
|
// Create the code emitter for the target if it exists. If not, .o file
|
||||||
@ -277,8 +277,8 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM,
|
|||||||
|
|
||||||
std::unique_ptr<MCStreamer> AsmStreamer;
|
std::unique_ptr<MCStreamer> AsmStreamer;
|
||||||
AsmStreamer.reset(getTarget().createMCObjectStreamer(
|
AsmStreamer.reset(getTarget().createMCObjectStreamer(
|
||||||
getTargetTriple(), *Ctx, *MAB, Out, MCE, STI, hasMCRelaxAll(),
|
getTargetTriple(), *Ctx, *MAB, Out, MCE, STI,
|
||||||
hasMCNoExecStack()));
|
Options.MCOptions.MCRelaxAll, Options.MCOptions.MCNoExecStack));
|
||||||
|
|
||||||
// Create the AsmPrinter, which takes ownership of AsmStreamer if successful.
|
// Create the AsmPrinter, which takes ownership of AsmStreamer if successful.
|
||||||
FunctionPass *Printer = getTarget().createAsmPrinter(*this, *AsmStreamer);
|
FunctionPass *Printer = getTarget().createAsmPrinter(*this, *AsmStreamer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user