[cfe-commits] r128292 - in /cfe/trunk: lib/Driver/Driver.cpp test/Driver/darwin-dsymutil.c

Daniel Dunbar daniel at zuster.org
Fri Mar 25 11:16:52 PDT 2011


Author: ddunbar
Date: Fri Mar 25 13:16:51 2011
New Revision: 128292

URL: http://llvm.org/viewvc/llvm-project?rev=128292&view=rev
Log:
Driver/Darwin: Dsymutil actions should put the dSYM adjacent to the output file.

Modified:
    cfe/trunk/lib/Driver/Driver.cpp
    cfe/trunk/test/Driver/darwin-dsymutil.c

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=128292&r1=128291&r2=128292&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Fri Mar 25 13:16:51 2011
@@ -1226,7 +1226,13 @@
   }
 
   llvm::SmallString<128> BasePath(BaseInput);
-  llvm::StringRef BaseName = llvm::sys::path::filename(BasePath);
+  llvm::StringRef BaseName;
+
+  // Dsymutil actions should use the full path.
+  if (isa<DsymutilJobAction>(JA))
+    BaseName = BasePath;
+  else
+    BaseName = llvm::sys::path::filename(BasePath);
 
   // Determine what the derived output name should be.
   const char *NamedOutput;

Modified: cfe/trunk/test/Driver/darwin-dsymutil.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-dsymutil.c?rev=128292&r1=128291&r2=128292&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-dsymutil.c (original)
+++ cfe/trunk/test/Driver/darwin-dsymutil.c Fri Mar 25 13:16:51 2011
@@ -36,3 +36,10 @@
 // RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
 // RUN:   -o foo %t.o -g 2> %t
 // RUN: grep "Dsymutil" %t | count 0
+
+// Check that we put the .dSYM in the right place.
+// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -ccc-print-bindings \
+// RUN:   -o bar/foo %s -g 2> %t
+// RUN: FileCheck -check-prefix=CHECK-LOCATION < %t %s
+
+// CHECK-LOCATION: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["bar/foo"], output: "bar/foo.dSYM"





More information about the cfe-commits mailing list