[cfe-commits] r110879 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/cxx-pth.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Wed Aug 11 16:27:58 PDT 2010


Author: akirtzidis
Date: Wed Aug 11 18:27:58 2010
New Revision: 110879

URL: http://llvm.org/viewvc/llvm-project?rev=110879&view=rev
Log:
Switch on PCH for C++. C++ fans all over the world rejoice.

Removed:
    cfe/trunk/test/Driver/cxx-pth.cpp
Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=110879&r1=110878&r2=110879&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Aug 11 18:27:58 2010
@@ -179,10 +179,8 @@
     const Arg *A = it;
 
     if (A->getOption().matches(options::OPT_include)) {
-      // Use PCH if the user requested it, except for C++ (for now).
+      // Use PCH if the user requested it.
       bool UsePCH = D.CCCUsePCH;
-      if (types::isCXX(Inputs[0].getType()))
-        UsePCH = false;
 
       bool FoundPTH = false;
       bool FoundPCH = false;
@@ -789,10 +787,8 @@
                       !IsOpt))
       CmdArgs.push_back("-mrelax-all");
   } else if (isa<PrecompileJobAction>(JA)) {
-    // Use PCH if the user requested it, except for C++ (for now).
+    // Use PCH if the user requested it.
     bool UsePCH = D.CCCUsePCH;
-    if (types::isCXX(Inputs[0].getType()))
-      UsePCH = false;
 
     if (UsePCH)
       CmdArgs.push_back("-emit-pch");

Removed: cfe/trunk/test/Driver/cxx-pth.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cxx-pth.cpp?rev=110878&view=auto
==============================================================================
--- cfe/trunk/test/Driver/cxx-pth.cpp (original)
+++ cfe/trunk/test/Driver/cxx-pth.cpp (removed)
@@ -1,12 +0,0 @@
-// Test forced PTH for CXX support.
-
-// RUN: %clangxx -x c++-header %s -### 2> %t.log
-// RUN: FileCheck -check-prefix EMIT -input-file %t.log %s
-
-// EMIT: "{{.*}}/clang{{.*}}" {{.*}} "-emit-pth" "{{.*}}.cpp.gch" "-x" "c++-header" "{{.*}}.cpp"
-
-// RUN: touch %t.h.gch
-// RUN: %clangxx -E -include %t.h %s -### 2> %t.log
-// RUN: FileCheck -check-prefix USE -input-file %t.log %s
-
-// USE: "{{.*}}/clang{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.gch" {{.*}}"-x" "c++" "{{.*}}.cpp"





More information about the cfe-commits mailing list