mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Move the TargetMachine MC options to MCTargetOptions. No functional
change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e880187bb6
commit
afc6099348
@ -22,12 +22,21 @@ public:
|
||||
/// Enables AddressSanitizer instrumentation at machine level.
|
||||
bool SanitizeAddress : 1;
|
||||
|
||||
unsigned MCRelaxAll : 1;
|
||||
unsigned MCNoExecStack : 1;
|
||||
unsigned MCSaveTempLabels : 1;
|
||||
unsigned MCUseDwarfDirectory : 1;
|
||||
|
||||
MCTargetOptions();
|
||||
};
|
||||
|
||||
inline bool operator==(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
|
||||
#define ARE_EQUAL(X) LHS.X == RHS.X
|
||||
return ARE_EQUAL(SanitizeAddress);
|
||||
return (ARE_EQUAL(SanitizeAddress) &&
|
||||
ARE_EQUAL(MCRelaxAll) &&
|
||||
ARE_EQUAL(MCNoExecStack) &&
|
||||
ARE_EQUAL(MCSaveTempLabels) &&
|
||||
ARE_EQUAL(MCUseDwarfDirectory));
|
||||
#undef ARE_EQUAL
|
||||
}
|
||||
|
||||
|
@ -84,10 +84,6 @@ protected: // Can only create subclasses.
|
||||
///
|
||||
const MCAsmInfo *AsmInfo;
|
||||
|
||||
unsigned MCRelaxAll : 1;
|
||||
unsigned MCNoExecStack : 1;
|
||||
unsigned MCSaveTempLabels : 1;
|
||||
unsigned MCUseDwarfDirectory : 1;
|
||||
unsigned RequireStructuredCFG : 1;
|
||||
|
||||
public:
|
||||
@ -168,33 +164,33 @@ public:
|
||||
|
||||
/// hasMCRelaxAll - Check whether all machine code instructions should be
|
||||
/// relaxed.
|
||||
bool hasMCRelaxAll() const { return MCRelaxAll; }
|
||||
bool hasMCRelaxAll() const { return Options.MCOptions.MCRelaxAll; }
|
||||
|
||||
/// setMCRelaxAll - Set whether all machine code instructions should be
|
||||
/// relaxed.
|
||||
void setMCRelaxAll(bool Value) { MCRelaxAll = Value; }
|
||||
void setMCRelaxAll(bool Value) { Options.MCOptions.MCRelaxAll = Value; }
|
||||
|
||||
/// hasMCSaveTempLabels - Check whether temporary labels will be preserved
|
||||
/// (i.e., not treated as temporary).
|
||||
bool hasMCSaveTempLabels() const { return MCSaveTempLabels; }
|
||||
bool hasMCSaveTempLabels() const { return Options.MCOptions.MCSaveTempLabels; }
|
||||
|
||||
/// setMCSaveTempLabels - Set whether temporary labels will be preserved
|
||||
/// (i.e., not treated as temporary).
|
||||
void setMCSaveTempLabels(bool Value) { MCSaveTempLabels = Value; }
|
||||
void setMCSaveTempLabels(bool Value) { Options.MCOptions.MCSaveTempLabels = Value; }
|
||||
|
||||
/// hasMCNoExecStack - Check whether an executable stack is not needed.
|
||||
bool hasMCNoExecStack() const { return MCNoExecStack; }
|
||||
bool hasMCNoExecStack() const { return Options.MCOptions.MCNoExecStack; }
|
||||
|
||||
/// setMCNoExecStack - Set whether an executabel stack is not needed.
|
||||
void setMCNoExecStack(bool Value) { MCNoExecStack = Value; }
|
||||
void setMCNoExecStack(bool Value) { Options.MCOptions.MCNoExecStack = Value; }
|
||||
|
||||
/// hasMCUseDwarfDirectory - Check whether we should use .file directives with
|
||||
/// explicit directories.
|
||||
bool hasMCUseDwarfDirectory() const { return MCUseDwarfDirectory; }
|
||||
bool hasMCUseDwarfDirectory() const { return Options.MCOptions.MCUseDwarfDirectory; }
|
||||
|
||||
/// setMCUseDwarfDirectory - Set whether all we should use .file directives
|
||||
/// with explicit directories.
|
||||
void setMCUseDwarfDirectory(bool Value) { MCUseDwarfDirectory = Value; }
|
||||
void setMCUseDwarfDirectory(bool Value) { Options.MCOptions.MCUseDwarfDirectory = Value; }
|
||||
|
||||
/// getRelocationModel - Returns the code generation relocation model. The
|
||||
/// choices are static, PIC, and dynamic-no-pic, and target default.
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
namespace llvm {
|
||||
|
||||
MCTargetOptions::MCTargetOptions() : SanitizeAddress(false) {}
|
||||
MCTargetOptions::MCTargetOptions()
|
||||
: SanitizeAddress(false), MCRelaxAll(false), MCNoExecStack(false),
|
||||
MCSaveTempLabels(false), MCUseDwarfDirectory(false) {}
|
||||
|
||||
} // end namespace llvm
|
||||
|
@ -55,10 +55,6 @@ TargetMachine::TargetMachine(const Target &T,
|
||||
const TargetOptions &Options)
|
||||
: TheTarget(T), TargetTriple(TT), TargetCPU(CPU), TargetFS(FS),
|
||||
CodeGenInfo(nullptr), AsmInfo(nullptr),
|
||||
MCRelaxAll(false),
|
||||
MCNoExecStack(false),
|
||||
MCSaveTempLabels(false),
|
||||
MCUseDwarfDirectory(false),
|
||||
RequireStructuredCFG(false),
|
||||
Options(Options) {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user