/// 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
}
///
const MCAsmInfo *AsmInfo;
- unsigned MCRelaxAll : 1;
- unsigned MCNoExecStack : 1;
- unsigned MCSaveTempLabels : 1;
- unsigned MCUseDwarfDirectory : 1;
unsigned RequireStructuredCFG : 1;
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.
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) {
}