[llvm] r208832 - Move the TargetMachine MC options to MCTargetOptions. No functional
Eric Christopher
echristo at gmail.com
Wed May 14 18:08:00 PDT 2014
Author: echristo
Date: Wed May 14 20:08:00 2014
New Revision: 208832
URL: http://llvm.org/viewvc/llvm-project?rev=208832&view=rev
Log:
Move the TargetMachine MC options to MCTargetOptions. No functional
change.
Modified:
llvm/trunk/include/llvm/MC/MCTargetOptions.h
llvm/trunk/include/llvm/Target/TargetMachine.h
llvm/trunk/lib/MC/MCTargetOptions.cpp
llvm/trunk/lib/Target/TargetMachine.cpp
Modified: llvm/trunk/include/llvm/MC/MCTargetOptions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCTargetOptions.h?rev=208832&r1=208831&r2=208832&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCTargetOptions.h (original)
+++ llvm/trunk/include/llvm/MC/MCTargetOptions.h Wed May 14 20:08:00 2014
@@ -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
}
Modified: llvm/trunk/include/llvm/Target/TargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=208832&r1=208831&r2=208832&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetMachine.h (original)
+++ llvm/trunk/include/llvm/Target/TargetMachine.h Wed May 14 20:08:00 2014
@@ -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.
Modified: llvm/trunk/lib/MC/MCTargetOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCTargetOptions.cpp?rev=208832&r1=208831&r2=208832&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCTargetOptions.cpp (original)
+++ llvm/trunk/lib/MC/MCTargetOptions.cpp Wed May 14 20:08:00 2014
@@ -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
Modified: llvm/trunk/lib/Target/TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=208832&r1=208831&r2=208832&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/TargetMachine.cpp Wed May 14 20:08:00 2014
@@ -55,10 +55,6 @@ TargetMachine::TargetMachine(const Targe
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) {
}
More information about the llvm-commits
mailing list