[llvm] r228961 - Remove mostly unused setters.
Rafael Espindola
rafael.espindola at gmail.com
Thu Feb 12 13:16:34 PST 2015
Author: rafael
Date: Thu Feb 12 15:16:34 2015
New Revision: 228961
URL: http://llvm.org/viewvc/llvm-project?rev=228961&view=rev
Log:
Remove mostly unused setters.
Most of the code was setting the TargetOptions directly.
Modified:
llvm/trunk/include/llvm/Target/TargetMachine.h
llvm/trunk/lib/Target/TargetMachine.cpp
llvm/trunk/lib/Target/TargetMachineC.cpp
Modified: llvm/trunk/include/llvm/Target/TargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=228961&r1=228960&r2=228961&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetMachine.h (original)
+++ llvm/trunk/include/llvm/Target/TargetMachine.h Thu Feb 12 15:16:34 2015
@@ -165,28 +165,23 @@ public:
bool shouldPrintMachineCode() const { return Options.PrintMachineCode; }
- /// getAsmVerbosityDefault - Returns the default value of asm verbosity.
+ /// Returns the default value of asm verbosity.
///
- bool getAsmVerbosityDefault() const ;
-
- /// setAsmVerbosityDefault - Set the default value of asm verbosity. Default
- /// is false.
- void setAsmVerbosityDefault(bool);
-
- /// getDataSections - Return true if data objects should be emitted into their
- /// own section, corresponds to -fdata-sections.
- bool getDataSections() const;
-
- /// getFunctionSections - Return true if functions should be emitted into
- /// their own section, corresponding to -ffunction-sections.
- bool getFunctionSections() const;
-
- /// setDataSections - Set if the data are emit into separate sections.
- void setDataSections(bool);
-
- /// setFunctionSections - Set if the functions are emit into separate
- /// sections.
- void setFunctionSections(bool);
+ bool getAsmVerbosityDefault() const {
+ return Options.MCOptions.AsmVerbose;
+ }
+
+ /// Return true if data objects should be emitted into their own section,
+ /// corresponds to -fdata-sections.
+ bool getDataSections() const {
+ return Options.DataSections;
+ }
+
+ /// Return true if functions should be emitted into their own section,
+ /// corresponding to -ffunction-sections.
+ bool getFunctionSections() const {
+ return Options.FunctionSections;
+ }
/// \brief Get a \c TargetIRAnalysis appropriate for the target.
///
Modified: llvm/trunk/lib/Target/TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=228961&r1=228960&r2=228961&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/TargetMachine.cpp Thu Feb 12 15:16:34 2015
@@ -148,30 +148,6 @@ void TargetMachine::setOptLevel(CodeGenO
CodeGenInfo->setOptLevel(Level);
}
-bool TargetMachine::getAsmVerbosityDefault() const {
- return Options.MCOptions.AsmVerbose;
-}
-
-void TargetMachine::setAsmVerbosityDefault(bool V) {
- Options.MCOptions.AsmVerbose = V;
-}
-
-bool TargetMachine::getFunctionSections() const {
- return Options.FunctionSections;
-}
-
-bool TargetMachine::getDataSections() const {
- return Options.DataSections;
-}
-
-void TargetMachine::setFunctionSections(bool V) {
- Options.FunctionSections = V;
-}
-
-void TargetMachine::setDataSections(bool V) {
- Options.DataSections = V;
-}
-
TargetIRAnalysis TargetMachine::getTargetIRAnalysis() {
return TargetIRAnalysis(
[this](Function &) { return TargetTransformInfo(getDataLayout()); });
Modified: llvm/trunk/lib/Target/TargetMachineC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachineC.cpp?rev=228961&r1=228960&r2=228961&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetMachineC.cpp (original)
+++ llvm/trunk/lib/Target/TargetMachineC.cpp Thu Feb 12 15:16:34 2015
@@ -179,7 +179,7 @@ LLVMTargetDataRef LLVMGetTargetMachineDa
void LLVMSetTargetMachineAsmVerbosity(LLVMTargetMachineRef T,
LLVMBool VerboseAsm) {
- unwrap(T)->setAsmVerbosityDefault(VerboseAsm);
+ unwrap(T)->Options.MCOptions.AsmVerbose = VerboseAsm;
}
static LLVMBool LLVMTargetMachineEmit(LLVMTargetMachineRef T, LLVMModuleRef M,
More information about the llvm-commits
mailing list