Fix a regression introduced when adding subframework support
llvm-svn: 39022
diff --git a/clang/Lex/Preprocessor.cpp b/clang/Lex/Preprocessor.cpp
index fe0694b..578cc16 100644
--- a/clang/Lex/Preprocessor.cpp
+++ b/clang/Lex/Preprocessor.cpp
@@ -271,7 +271,7 @@
// Otherwise, see if this is a subframework header. If so, this is relative
// to one of the headers on the #include stack. Walk the list of the current
// headers on the #include stack and pass them to HeaderInfo.
- if (CurLexer) {
+ if (CurLexer && !CurLexer->Is_PragmaLexer) {
CurFileEnt = SourceMgr.getFileEntryForFileID(CurLexer->getCurFileID());
if ((FE = HeaderInfo.LookupSubframeworkHeader(Filename, CurFileEnt)))
return FE;
@@ -279,7 +279,7 @@
for (unsigned i = 0, e = IncludeMacroStack.size(); i != e; ++i) {
IncludeStackInfo &ISEntry = IncludeMacroStack[e-i-1];
- if (ISEntry.TheLexer) {
+ if (ISEntry.TheLexer && !ISEntry.TheLexer->Is_PragmaLexer) {
CurFileEnt =
SourceMgr.getFileEntryForFileID(ISEntry.TheLexer->getCurFileID());
if ((FE = HeaderInfo.LookupSubframeworkHeader(Filename, CurFileEnt)))