Revert 59574 (caused tests to fail).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59579 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp
index cee2f40..07c5f8e 100644
--- a/lib/Lex/PPDirectives.cpp
+++ b/lib/Lex/PPDirectives.cpp
@@ -317,7 +317,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 (IsNonPragmaNonMacroLexer()) {
+  if (CurLexer && !CurLexer->Is_PragmaLexer) {
     if ((CurFileEnt = SourceMgr.getFileEntryForLoc(CurLexer->getFileLoc())))
       if ((FE = HeaderInfo.LookupSubframeworkHeader(FilenameStart, FilenameEnd,
                                                     CurFileEnt)))
@@ -326,7 +326,7 @@
   
   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,