diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-02-05 16:36:52 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-02-05 16:36:52 +0000 |
commit | 48b72d81c8968f3d342557582db986a60aef2c54 (patch) | |
tree | 06af75dac2898c6c3a52ed3132d9facb80921462 /clang/lib/Frontend/FrontendAction.cpp | |
parent | b76de88288b32ce192a03cd7b387bf0137fbd436 (diff) | |
download | llvm-48b72d81c8968f3d342557582db986a60aef2c54.zip llvm-48b72d81c8968f3d342557582db986a60aef2c54.tar.gz llvm-48b72d81c8968f3d342557582db986a60aef2c54.tar.bz2 |
[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
llvm-svn: 174385
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendAction.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 05064fb..6d31c31 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -247,16 +247,8 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, 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; } } |