From a7c279ba409061337b7caf3a7e6cd233e9bbb24d Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 19 Nov 2008 01:54:47 +0000 Subject: Revert 59574 (caused tests to fail). llvm-svn: 59579 --- clang/lib/Lex/PPDirectives.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Lex/PPDirectives.cpp') diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index cee2f406cdb..07c5f8ea68e 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -317,7 +317,7 @@ const FileEntry *Preprocessor::LookupFile(const char *FilenameStart, // 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 (IsNonPragmaNonMacroLexer()) { + if (CurLexer && !CurLexer->Is_PragmaLexer) { if ((CurFileEnt = SourceMgr.getFileEntryForLoc(CurLexer->getFileLoc()))) if ((FE = HeaderInfo.LookupSubframeworkHeader(FilenameStart, FilenameEnd, CurFileEnt))) @@ -326,7 +326,7 @@ const FileEntry *Preprocessor::LookupFile(const char *FilenameStart, for (unsigned i = 0, e = IncludeMacroStack.size(); i != e; ++i) { IncludeStackInfo &ISEntry = IncludeMacroStack[e-i-1]; - if (IsNonPragmaNonMacroLexer(ISEntry)) { + if (ISEntry.TheLexer && !ISEntry.TheLexer->Is_PragmaLexer) { if ((CurFileEnt = SourceMgr.getFileEntryForLoc(ISEntry.TheLexer->getFileLoc()))) if ((FE = HeaderInfo.LookupSubframeworkHeader(FilenameStart, -- cgit v1.2.3