Use -enable-global-merge option to match llvm r210639. <rdar://problem/17803206>
authorBob Wilson <bob.wilson@apple.com>
Sat, 26 Jul 2014 00:37:28 +0000 (00:37 +0000)
committerBob Wilson <bob.wilson@apple.com>
Sat, 26 Jul 2014 00:37:28 +0000 (00:37 +0000)
llvm revision 210639 renamed the -global-merge backend option to
-enable-global-merge. This change simply updates clang to match that.

Patch by Steven Wu!

llvm-svn: 213993

clang/lib/CodeGen/BackendUtil.cpp
clang/test/Driver/mno-global-merge.c

index a1521dc..cec48f3 100644 (file)
@@ -383,7 +383,7 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
   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("-enable-global-merge=false");
   BackendArgs.push_back(nullptr);
   llvm::cl::ParseCommandLineOptions(BackendArgs.size() - 1,
                                     BackendArgs.data());
index a17848f..daf029e 100644 (file)
@@ -18,3 +18,8 @@
 
 // CHECK-GM-NOT: "-mglobal-merge"
 
+// RUN: %clang -target armv7-apple-darwin10 \
+// RUN:   -mno-global-merge -c %s
+
+// RUN: %clang -target armv7-apple-darwin10 \
+// RUN:   -mglobal-merge -c %s