Move the function and data section flags into the options struct and

make the functions to set them non-static.
Move and rename the llvm specific backend options to avoid conflicting
with the clang option.

Paired with a backend commit to update.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209238 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-05-20 21:25:34 +00:00
parent 95aa960b71
commit 6a9366c0c6
6 changed files with 69 additions and 61 deletions

View File

@@ -36,15 +36,6 @@ namespace llvm {
bool AsmVerbosityDefault(false);
}
static cl::opt<bool>
DataSections("fdata-sections",
cl::desc("Emit data into separate sections"),
cl::init(false));
static cl::opt<bool>
FunctionSections("ffunction-sections",
cl::desc("Emit functions into separate sections"),
cl::init(false));
//---------------------------------------------------------------------------
// TargetMachine Class
//
@@ -179,20 +170,20 @@ void TargetMachine::setAsmVerbosityDefault(bool V) {
AsmVerbosityDefault = V;
}
bool TargetMachine::getFunctionSections() {
return FunctionSections;
bool TargetMachine::getFunctionSections() const {
return Options.FunctionSections;
}
bool TargetMachine::getDataSections() {
return DataSections;
bool TargetMachine::getDataSections() const {
return Options.DataSections;
}
void TargetMachine::setFunctionSections(bool V) {
FunctionSections = V;
Options.FunctionSections = V;
}
void TargetMachine::setDataSections(bool V) {
DataSections = V;
Options.DataSections = V;
}
void TargetMachine::getNameWithPrefix(SmallVectorImpl<char> &Name,