diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-04-13 00:36:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-04-13 00:36:43 +0000 |
| commit | 5b212a31a207f8b44b0f6920ee724770fc05bcd1 (patch) | |
| tree | 8f4448f5a253603d50d0d06fed2630d7c01c93e9 /llvm/lib/Target | |
| parent | 74c10507a6c9b0eb034ffe154a194de2088e7522 (diff) | |
| download | bcm5719-llvm-5b212a31a207f8b44b0f6920ee724770fc05bcd1.tar.gz bcm5719-llvm-5b212a31a207f8b44b0f6920ee724770fc05bcd1.zip | |
add llvm codegen support for -ffunction-sections and -fdata-sections,
patch by Sylvere Teissier!
llvm-svn: 101106
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index 88871e3580c..871b148adb3 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -197,7 +197,14 @@ EnableStrongPHIElim(cl::Hidden, "strong-phi-elim", cl::desc("Use strong PHI elimination."), cl::location(StrongPHIElim), cl::init(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 // @@ -244,6 +251,22 @@ void TargetMachine::setAsmVerbosityDefault(bool V) { AsmVerbosityDefault = V; } +bool TargetMachine::getFunctionSections() { + return FunctionSections; +} + +bool TargetMachine::getDataSections() { + return DataSections; +} + +void TargetMachine::setFunctionSections(bool V) { + FunctionSections = V; +} + +void TargetMachine::setDataSections(bool V) { + DataSections = V; +} + namespace llvm { /// LessPreciseFPMAD - This flag return true when -enable-fp-mad option /// is specified on the command line. When this flag is off(default), the |

