From dfe47dba37cc785df2f2736734d9ab2bffe39b80 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Fri, 15 Oct 2010 18:51:34 +0000 Subject: [PATCH] Revert r116605, a lot more were committed by mistake. llvm-svn: 116606 --- .../clang/Basic/DiagnosticDriverKinds.td | 2 -- clang/include/clang/Driver/Options.td | 1 - clang/lib/Driver/Tools.cpp | 10 --------- clang/test/Driver/pth.c | 21 ------------------- 4 files changed, 34 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td index a7c30a744d2f..19011ace7f27 100644 --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -102,7 +102,5 @@ def warn_drv_objc_gc_unsupported : Warning< "Objective-C garbage collection is not supported on this platform, ignoring '%0'">; def warn_drv_pch_not_first_include : Warning< "precompiled header '%0' was ignored because '%1' is not first '-include'">; -def warn_drv_pch_missing_language : Warning< - "ignoring argument '%0' due to missing precompiled header '%1' for language '%2'">; } diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index ab87d57d4353..cfb9c81b574c 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -426,7 +426,6 @@ def iframework : JoinedOrSeparate<"-iframework">, Group; def imacros : JoinedOrSeparate<"-imacros">, Group; def image__base : Separate<"-image_base">; def include_ : JoinedOrSeparate<"-include">, Group, EnumName<"include">; -def include_pch : Separate<"-include-pch">, Group; def init : Separate<"-init">; def install__name : Separate<"-install_name">; def integrated_as : Flag<"-integrated-as">, Flags<[DriverOption]>; diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index fd57cffbc543..229cf608f3f0 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -256,16 +256,6 @@ void Clang::AddPreprocessingOptions(const Driver &D, if (FoundPCH || FoundPTH) { if (IsFirstImplicitInclude) { A->claim(); - if (P.isDirectory()) { - // Expect to find a precompiled header matching the current input type - P.appendComponent(types::getTypeName(Inputs[0].getType())); - if (!P.exists()) { - D.Diag(clang::diag::warn_drv_pch_missing_language) - << A->getAsString(Args) << P.str() - << types::getTypeName(Inputs[0].getType()); - continue; - } - } if (UsePCH) CmdArgs.push_back("-include-pch"); else diff --git a/clang/test/Driver/pth.c b/clang/test/Driver/pth.c index d6ed90423b62..9c47c5599376 100644 --- a/clang/test/Driver/pth.c +++ b/clang/test/Driver/pth.c @@ -10,24 +10,3 @@ // RUN: FileCheck -check-prefix CHECK2 -input-file %t.log %s // CHECK2: "{{.*}}/clang{{.*}}" "-cc1" {{.*}}"-include-pth" "{{.*}}.h.pth" {{.*}}"-x" "c" "{{.*}}pth.c" - -// RUN: mkdir -p %t.pth -// RUN: %clang -ccc-pch-is-pth -x c-header %s -o %t.pth/c -### 2> %t.log -// RUN: FileCheck -check-prefix CHECK3 -input-file %t.log %s - -// CHECK3: "{{.*}}/clang{{.*}}" "-cc1" {{.*}} "-o" "{{.*}}.pth/c" "-x" "c-header" "{{.*}}pth.c" - -// RUN: rm -f %t.pth/c -// RUN: %clang -ccc-pch-is-pth -E -include %t %s -### 2> %t.log -// RUN: echo "DONE" >> %t.log -// RUN: FileCheck -check-prefix CHECK4 -input-file %t.log %s - -// CHECK4: {{.*}} ignoring argument '-include {{.*}}' due to missing precompiled header '{{.*}}.pth/c' for language 'c' -// CHECK4-NOT: -include-pth -// CHECK4: DONE - -// RUN: touch %t.pth/c -// RUN: %clang -ccc-pch-is-pth -E -include %t %s -### 2> %t.log -// RUN: FileCheck -check-prefix CHECK5 -input-file %t.log %s - -// CHECK5: "{{.*}}/clang{{.*}}" "-cc1" {{.*}}"-include-pth" "{{.*}}.pth/c" {{.*}}"-x" "c" "{{.*}}pth.c"