mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
Integrated-As: Add support for setting the AllowTemporaryLabels flag via
integrated-as. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c6cf43d258
commit
a7b8c2b6a4
@ -106,6 +106,7 @@ protected: // Can only create subclasses.
|
||||
|
||||
unsigned MCRelaxAll : 1;
|
||||
unsigned MCNoExecStack : 1;
|
||||
unsigned MCSaveTempLabels : 1;
|
||||
unsigned MCUseLoc : 1;
|
||||
|
||||
public:
|
||||
@ -172,6 +173,14 @@ public:
|
||||
/// relaxed.
|
||||
void setMCRelaxAll(bool Value) { MCRelaxAll = Value; }
|
||||
|
||||
/// hasMCSaveTempLabels - Check whether temporary labels will be preserved
|
||||
/// (i.e., not treated as temporary).
|
||||
bool hasMCSaveTempLabels() const { return MCSaveTempLabels; }
|
||||
|
||||
/// setMCSaveTempLabels - Set whether temporary labels will be preserved
|
||||
/// (i.e., not treated as temporary).
|
||||
void setMCSaveTempLabels(bool Value) { MCSaveTempLabels = Value; }
|
||||
|
||||
/// hasMCNoExecStack - Check whether an executable stack is not needed.
|
||||
bool hasMCNoExecStack() const { return MCNoExecStack; }
|
||||
|
||||
|
@ -126,6 +126,9 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
||||
return true;
|
||||
assert(Context != 0 && "Failed to get MCContext");
|
||||
|
||||
if (hasMCSaveTempLabels())
|
||||
Context->setAllowTemporaryLabels(false);
|
||||
|
||||
const MCAsmInfo &MAI = *getMCAsmInfo();
|
||||
OwningPtr<MCStreamer> AsmStreamer;
|
||||
|
||||
@ -231,6 +234,9 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM,
|
||||
if (addCommonCodeGenPasses(PM, OptLevel, DisableVerify, Ctx))
|
||||
return true;
|
||||
|
||||
if (hasMCSaveTempLabels())
|
||||
Ctx->setAllowTemporaryLabels(false);
|
||||
|
||||
// Create the code emitter for the target if it exists. If not, .o file
|
||||
// emission fails.
|
||||
MCCodeEmitter *MCE = getTarget().createCodeEmitter(*this, *Ctx);
|
||||
|
@ -221,6 +221,7 @@ TargetMachine::TargetMachine(const Target &T)
|
||||
: TheTarget(T), AsmInfo(0),
|
||||
MCRelaxAll(false),
|
||||
MCNoExecStack(false),
|
||||
MCSaveTempLabels(false),
|
||||
MCUseLoc(true) {
|
||||
// Typically it will be subtargets that will adjust FloatABIType from Default
|
||||
// to Soft or Hard.
|
||||
|
Loading…
Reference in New Issue
Block a user