aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CodeGenAction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-13 00:38:24 +0000
committerChris Lattner <sabre@nondot.org>2010-04-13 00:38:24 +0000
commitbbea7168326d810eff18dfb8bc43c7790fd55010 (patch)
treecacfc50825a40a94dfd6f48bc5bcd5361539f65c /lib/Frontend/CodeGenAction.cpp
parent0b2bd47151ee9205ad6c66d1ffb921918106088a (diff)
add frontend support for -fdata-sections and -ffunction-sections,
patch by Sylvere Teissier! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CodeGenAction.cpp')
-rw-r--r--lib/Frontend/CodeGenAction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Frontend/CodeGenAction.cpp b/lib/Frontend/CodeGenAction.cpp
index 7ed702ed51..fdce21170e 100644
--- a/lib/Frontend/CodeGenAction.cpp
+++ b/lib/Frontend/CodeGenAction.cpp
@@ -261,6 +261,9 @@ bool BackendConsumer::AddEmitPasses() {
TargetMachine::setAsmVerbosityDefault(CodeGenOpts.AsmVerbose);
+ TargetMachine::setFunctionSections(CodeGenOpts.FunctionSections);
+ TargetMachine::setDataSections (CodeGenOpts.DataSections);
+
// FIXME: Parse this earlier.
if (CodeGenOpts.RelocationModel == "static") {
TargetMachine::setRelocationModel(llvm::Reloc::Static);