[cfe-commits] r91174 - in /cfe/trunk: include/clang/Driver/CC1Options.td lib/Driver/Tools.cpp test/Driver/clang-translation.c test/Driver/cxx-pth.cpp test/Driver/dragonfly.c test/Driver/freebsd.c test/Driver/hello.c test/Driver/openbsd.c test/Driver/pth.c

Daniel Dunbar daniel at zuster.org
Fri Dec 11 15:00:49 PST 2009


Author: ddunbar
Date: Fri Dec 11 17:00:49 2009
New Revision: 91174

URL: http://llvm.org/viewvc/llvm-project?rev=91174&view=rev
Log:
Driver: Switch to using "clang" "-cc1" instead of "clang-cc".

Modified:
    cfe/trunk/include/clang/Driver/CC1Options.td
    cfe/trunk/lib/Driver/Tools.cpp
    cfe/trunk/test/Driver/clang-translation.c
    cfe/trunk/test/Driver/cxx-pth.cpp
    cfe/trunk/test/Driver/dragonfly.c
    cfe/trunk/test/Driver/freebsd.c
    cfe/trunk/test/Driver/hello.c
    cfe/trunk/test/Driver/openbsd.c
    cfe/trunk/test/Driver/pth.c

Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=91174&r1=91173&r2=91174&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Fri Dec 11 17:00:49 2009
@@ -187,6 +187,10 @@
 // Frontend Options
 //===----------------------------------------------------------------------===//
 
+// This isn't normally used, it is just here so we can parse a
+// CompilerInvocation out of a driver-derived argument vector.
+def cc1 : Flag<"-cc1">;
+
 def code_completion_at : Separate<"-code-completion-at">,
   MetaVarName<"<file>:<line>:<column>">,
   HelpText<"Dump code-completion information at a location">;

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=91174&r1=91173&r2=91174&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Dec 11 17:00:49 2009
@@ -593,6 +593,11 @@
 
   assert(Inputs.size() == 1 && "Unable to handle multiple inputs.");
 
+  // Invoke ourselves in -cc1 mode.
+  //
+  // FIXME: Implement custom jobs for internal actions.
+  CmdArgs.push_back("-cc1");
+
   // Add the "effective" target triple.
   CmdArgs.push_back("-triple");
   std::string TripleStr = getEffectiveClangTriple(D, getToolChain(), Args);
@@ -1037,7 +1042,7 @@
 
   // Default to -fno-builtin-str{cat,cpy} on Darwin for ARM.
   //
-  // FIXME: This is disabled until clang-cc supports -fno-builtin-foo. PR4941.
+  // FIXME: This is disabled until clang -cc1 supports -fno-builtin-foo. PR4941.
 #if 0
   if (getToolChain().getTriple().getOS() == llvm::Triple::Darwin &&
       (getToolChain().getTriple().getArch() == llvm::Triple::arm ||
@@ -1087,7 +1092,7 @@
   Args.AddAllArgs(CmdArgs, options::OPT_undef);
 
   const char *Exec =
-    Args.MakeArgString(getToolChain().GetProgramPath(C, "clang-cc"));
+    Args.MakeArgString(getToolChain().GetProgramPath(C, "clang"));
   Dest.addCommand(new Command(JA, *this, Exec, CmdArgs));
 
   // Explicitly warn that these options are unsupported, even though

Modified: cfe/trunk/test/Driver/clang-translation.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-translation.c?rev=91174&r1=91173&r2=91174&view=diff

==============================================================================
--- cfe/trunk/test/Driver/clang-translation.c (original)
+++ cfe/trunk/test/Driver/clang-translation.c Fri Dec 11 17:00:49 2009
@@ -17,7 +17,8 @@
 // RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \
 // RUN:   -arch armv7
 // RUN: FileCheck -check-prefix=ARMV7_DEFAULT %s < %t.log
-// ARMV7_DEFAULT: clang-cc
+// ARMV7_DEFAULT: clang
+// ARMV7_DEFAULT: "-cc1"
 // ARMV7_DEFAULT-NOT: "-msoft-float"
 // ARMV7_DEFAULT: "-mfloat-abi" "soft"
 // ARMV7_DEFAULT-NOT: "-msoft-float"
@@ -26,7 +27,8 @@
 // RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \
 // RUN:   -arch armv7 -msoft-float
 // RUN: FileCheck -check-prefix=ARMV7_SOFTFLOAT %s < %t.log
-// ARMV7_SOFTFLOAT: clang-cc
+// ARMV7_SOFTFLOAT: clang
+// ARMV7_SOFTFLOAT: "-cc1"
 // ARMV7_SOFTFLOAT: "-msoft-float"
 // ARMV7_SOFTFLOAT: "-mfloat-abi" "soft"
 // ARMV7_SOFTFLOAT: "-x" "c"
@@ -34,7 +36,8 @@
 // RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \
 // RUN:   -arch armv7 -mhard-float
 // RUN: FileCheck -check-prefix=ARMV7_HARDFLOAT %s < %t.log
-// ARMV7_HARDFLOAT: clang-cc
+// ARMV7_HARDFLOAT: clang
+// ARMV7_HARDFLOAT: "-cc1"
 // ARMV7_HARDFLOAT-NOT: "-msoft-float"
 // ARMV7_HARDFLOAT: "-mfloat-abi" "hard"
 // ARMV7_HARDFLOAT-NOT: "-msoft-float"

Modified: cfe/trunk/test/Driver/cxx-pth.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cxx-pth.cpp?rev=91174&r1=91173&r2=91174&view=diff

==============================================================================
--- cfe/trunk/test/Driver/cxx-pth.cpp (original)
+++ cfe/trunk/test/Driver/cxx-pth.cpp Fri Dec 11 17:00:49 2009
@@ -3,10 +3,10 @@
 // RUN: clang -x c++-header %s -### 2> %t.log
 // RUN: FileCheck -check-prefix EMIT -input-file %t.log %s
 
-// EMIT: "{{.*}}/clang-cc{{.*}}" {{.*}} "-emit-pth" "{{.*}}.cpp.gch" "-x" "c++-header" "{{.*}}.cpp"
+// EMIT: "{{.*}}/clang{{.*}}" {{.*}} "-emit-pth" "{{.*}}.cpp.gch" "-x" "c++-header" "{{.*}}.cpp"
 
 // RUN: touch %t.h.gch
 // RUN: clang -E -include %t.h %s -### 2> %t.log
 // RUN: FileCheck -check-prefix USE -input-file %t.log %s
 
-// USE: "{{.*}}/clang-cc{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.gch" {{.*}}"-x" "c++" "{{.*}}.cpp"
+// USE: "{{.*}}/clang{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.gch" {{.*}}"-x" "c++" "{{.*}}.cpp"

Modified: cfe/trunk/test/Driver/dragonfly.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/dragonfly.c?rev=91174&r1=91173&r2=91174&view=diff

==============================================================================
--- cfe/trunk/test/Driver/dragonfly.c (original)
+++ cfe/trunk/test/Driver/dragonfly.c Fri Dec 11 17:00:49 2009
@@ -1,7 +1,7 @@
 // RUN: clang -ccc-host-triple amd64-pc-dragonfly %s -### 2> %t.log
 // RUN: FileCheck -input-file %t.log %s
 
-// CHECK: clang-cc{{.*}}" "-triple" "amd64-pc-dragonfly"
+// CHECK: clang{{.*}}" "-cc1" "-triple" "amd64-pc-dragonfly"
 // CHECK: as{{.*}}" "-o" "{{.*}}.o" "{{.*}}.s
 // CHECK: ld{{.*}}" "-dynamic-linker" "{{.*}}ld-elf.{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-L{{.*}}/gcc{{.*}}" {{.*}} "-lc" "-lgcc" "{{.*}}crtend.o" "{{.*}}crtn.o"
 

Modified: cfe/trunk/test/Driver/freebsd.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/freebsd.c?rev=91174&r1=91173&r2=91174&view=diff

==============================================================================
--- cfe/trunk/test/Driver/freebsd.c (original)
+++ cfe/trunk/test/Driver/freebsd.c Fri Dec 11 17:00:49 2009
@@ -2,6 +2,6 @@
 // RUN: cat %t.log
 // RUN: FileCheck -input-file %t.log %s
 
-// CHECK: clang-cc{{.*}}" "-triple" "powerpc64-pc-freebsd8"
+// CHECK: clang{{.*}}" "-cc1" "-triple" "powerpc64-pc-freebsd8"
 // CHECK: as{{.*}}" "-o" "{{.*}}.o" "{{.*}}.s
 // CHECK: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld-elf{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "{{.*}}crtend.o" "{{.*}}crtn.o"

Modified: cfe/trunk/test/Driver/hello.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/hello.c?rev=91174&r1=91173&r2=91174&view=diff

==============================================================================
--- cfe/trunk/test/Driver/hello.c (original)
+++ cfe/trunk/test/Driver/hello.c Fri Dec 11 17:00:49 2009
@@ -1,7 +1,7 @@
 // RUN: clang -ccc-echo -o %t %s 2> %t.log
 
 // Make sure we used clang.
-// RUN: grep 'clang-cc" .*hello.c' %t.log
+// RUN: grep 'clang" -cc1 .*hello.c' %t.log
 
 // RUN: %t > %t.out
 // RUN: grep "I'm a little driver, short and stout." %t.out

Modified: cfe/trunk/test/Driver/openbsd.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/openbsd.c?rev=91174&r1=91173&r2=91174&view=diff

==============================================================================
--- cfe/trunk/test/Driver/openbsd.c (original)
+++ cfe/trunk/test/Driver/openbsd.c Fri Dec 11 17:00:49 2009
@@ -1,6 +1,6 @@
 // RUN: clang -ccc-clang-archs "" -ccc-host-triple i686-pc-openbsd %s -### 2> %t.log
 // RUN: FileCheck -input-file %t.log %s
 
-// CHECK: clang-cc{{.*}}" "-triple" "i686-pc-openbsd"
+// CHECK: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
 // CHECK: as{{.*}}" "-o" "{{.*}}.o" "{{.*}}.s
 // CHECK: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "-lc" "-lgcc" "{{.*}}crtend.o"

Modified: cfe/trunk/test/Driver/pth.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/pth.c?rev=91174&r1=91173&r2=91174&view=diff

==============================================================================
--- cfe/trunk/test/Driver/pth.c (original)
+++ cfe/trunk/test/Driver/pth.c Fri Dec 11 17:00:49 2009
@@ -3,10 +3,10 @@
 // RUN: clang -ccc-pch-is-pth -x c-header %s -o %t.h.pth -### 2> %t.log
 // RUN: FileCheck -check-prefix CHECK1 -input-file %t.log %s
 
-// CHECK1: "{{.*}}/clang-cc{{.*}}" {{.*}} "-o" "{{.*}}.h.pth" "-x" "c-header" "{{.*}}pth.c"
+// CHECK1: "{{.*}}/clang{{.*}}" "-cc1" {{.*}} "-o" "{{.*}}.h.pth" "-x" "c-header" "{{.*}}pth.c"
 
 // RUN: touch %t.h.pth
 // RUN: clang -ccc-pch-is-pth -E -include %t.h %s -### 2> %t.log
 // RUN: FileCheck -check-prefix CHECK2 -input-file %t.log %s
 
-// CHECK2: "{{.*}}/clang-cc{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.pth" {{.*}}"-x" "c" "{{.*}}pth.c"
+// CHECK2: "{{.*}}/clang{{.*}}" "-cc1" {{.*}}"-include-pth" "{{.*}}.h.pth" {{.*}}"-x" "c" "{{.*}}pth.c"





More information about the cfe-commits mailing list