[frontend] Don't put a PCH/PTH filename into the set of includes in the preprocessor options;
since only one of them is allowed in command-line, process them separately.
Otherwise, if more than one is specified in the command-line, one is processed normally
and the others are going to be treated and included as header files.
Related to radar://13140508
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174385 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp
index 05064fb..6d31c31 100644
--- a/lib/Frontend/FrontendAction.cpp
+++ b/lib/Frontend/FrontendAction.cpp
@@ -247,16 +247,8 @@
CI.getLangOpts(),
CI.getTargetOpts(),
CI.getPreprocessorOpts())) {
- for (unsigned I = 0, N = PPOpts.Includes.size(); I != N; ++I) {
- if (PPOpts.Includes[I] == PPOpts.ImplicitPCHInclude) {
- PPOpts.Includes[I] = Dir->path();
- PPOpts.ImplicitPCHInclude = Dir->path();
- Found = true;
- break;
- }
- }
-
- assert(Found && "Implicit PCH include not in includes list?");
+ PPOpts.ImplicitPCHInclude = Dir->path();
+ Found = true;
break;
}
}