diff options
author | Eric Christopher <echristo@gmail.com> | 2014-05-15 01:08:00 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-05-15 01:08:00 +0000 |
commit | afc6099348a77ec9c9b81fe90824975dca9f2d75 (patch) | |
tree | 211802e01cc6c77b60683872e0aa44f2ccf4fea4 /include | |
parent | e880187bb66294944e68c1d5e099813adb4b55e2 (diff) | |
download | llvm-afc6099348a77ec9c9b81fe90824975dca9f2d75.tar.gz llvm-afc6099348a77ec9c9b81fe90824975dca9f2d75.tar.bz2 llvm-afc6099348a77ec9c9b81fe90824975dca9f2d75.tar.xz |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCTargetOptions.h | 11 | ||||
-rw-r--r-- | include/llvm/Target/TargetMachine.h | 20 |
2 files changed, 18 insertions, 13 deletions
diff --git a/include/llvm/MC/MCTargetOptions.h b/include/llvm/MC/MCTargetOptions.h index 3adaf0d5bd..225ed7d85f 100644 --- a/include/llvm/MC/MCTargetOptions.h +++ b/include/llvm/MC/MCTargetOptions.h @@ -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 } diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index 151be73211..905cbc6631 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -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. |