[cfe-commits] r141434 - in /cfe/trunk: lib/Driver/Tools.cpp test/ARCMT/driver-migrate.m

Argyrios Kyrtzidis akyrtzi at gmail.com
Fri Oct 7 15:58:08 PDT 2011


Author: akirtzidis
Date: Fri Oct  7 17:58:08 2011
New Revision: 141434

URL: http://llvm.org/viewvc/llvm-project?rev=141434&view=rev
Log:
[arcmt] Ignore linking errors when doing ARC migration, rdar://10247606

Modified:
    cfe/trunk/lib/Driver/Tools.cpp
    cfe/trunk/test/ARCMT/driver-migrate.m

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=141434&r1=141433&r2=141434&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Oct  7 17:58:08 2011
@@ -3372,6 +3372,18 @@
   // more information.
   ArgStringList CmdArgs;
 
+  /// Hack(tm) to ignore linking errors when we are doing ARC migration.
+  if (Args.hasArg(options::OPT_ccc_arcmt_check,
+                  options::OPT_ccc_arcmt_migrate)) {
+    for (ArgList::const_iterator I = Args.begin(), E = Args.end(); I != E; ++I)
+      (*I)->claim();
+    const char *Exec =
+      Args.MakeArgString(getToolChain().GetProgramPath("touch"));
+    CmdArgs.push_back(Output.getFilename());
+    C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+    return;
+  }
+
   // I'm not sure why this particular decomposition exists in gcc, but
   // we follow suite for ease of comparison.
   AddLinkArgs(C, Args, CmdArgs);

Modified: cfe/trunk/test/ARCMT/driver-migrate.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/driver-migrate.m?rev=141434&r1=141433&r2=141434&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/driver-migrate.m (original)
+++ cfe/trunk/test/ARCMT/driver-migrate.m Fri Oct  7 17:58:08 2011
@@ -1,3 +1,12 @@
 // RUN: %clang -### -ccc-arcmt-migrate /foo/bar -fsyntax-only %s 2>&1 | FileCheck %s
 
 // CHECK: "-arcmt-migrate" "-arcmt-migrate-directory" "{{[^"]*}}/foo/bar"
+
+// RUN: touch %t.o
+// RUN: %clang -ccc-arcmt-check -ccc-host-triple i386-apple-darwin9 -### %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=LINK %s < %t.log
+// RUN: %clang -ccc-arcmt-migrate /foo/bar -ccc-host-triple i386-apple-darwin9 -### %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=LINK %s < %t.log
+
+// LINK-NOT: ld"
+// LINK: touch"





More information about the cfe-commits mailing list