aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-08-26 00:26:29 +0000
committerChad Rosier <mcrosier@apple.com>2011-08-26 00:26:29 +0000
commitba3df1d3ca8569ff8f6e289594c53926e71e519a (patch)
tree45b3d9f4daed8d50fda4f7fcc37feabefa110cae /clang/lib/CodeGen/BackendUtil.cpp
parent35bc5de3bdafbe44f774306885c49bcfecee3173 (diff)
downloadllvm-ba3df1d3ca8569ff8f6e289594c53926e71e519a.zip
llvm-ba3df1d3ca8569ff8f6e289594c53926e71e519a.tar.gz
llvm-ba3df1d3ca8569ff8f6e289594c53926e71e519a.tar.bz2
[driver] Add -mglobal-merge/-mno-global-merge machine options to enable/disable merging of
globals during codegen. Fixes <rdar://problem/10017909>. llvm-svn: 138612
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 7546633..9346cf3 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -269,6 +269,8 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action,
BackendArgs.push_back("-time-passes");
for (unsigned i = 0, e = CodeGenOpts.BackendOptions.size(); i != e; ++i)
BackendArgs.push_back(CodeGenOpts.BackendOptions[i].c_str());
+ if (CodeGenOpts.NoGlobalMerge)
+ BackendArgs.push_back("-global-merge=false");
BackendArgs.push_back(0);
llvm::cl::ParseCommandLineOptions(BackendArgs.size() - 1,
const_cast<char **>(&BackendArgs[0]));