Switch on PCH for C++. C++ fans all over the world rejoice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110879 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index c1a16ea..967d9f8 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -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");
diff --git a/test/Driver/cxx-pth.cpp b/test/Driver/cxx-pth.cpp
deleted file mode 100644
index 97afb5e..0000000
--- a/test/Driver/cxx-pth.cpp
+++ /dev/null
@@ -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"