diff options
-rw-r--r-- | lib/Driver/Tools.cpp | 8 | ||||
-rw-r--r-- | test/Driver/cxx-pth.cpp | 12 |
2 files changed, 2 insertions, 18 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index c1a16ea177..967d9f8332 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -179,10 +179,8 @@ void Clang::AddPreprocessingOptions(const Driver &D, 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 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, !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 97afb5ebe8..0000000000 --- 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" |