]> granicus.if.org Git - clang/commitdiff
Rename IsNonPragmaNonMacroLexer to IsFileLexer.
authorTed Kremenek <kremenek@apple.com>
Thu, 20 Nov 2008 16:19:53 +0000 (16:19 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 20 Nov 2008 16:19:53 +0000 (16:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59731 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Lex/Preprocessor.h
lib/Lex/PPDirectives.cpp
lib/Lex/PPLexerChange.cpp

index a92df2ccc417a2bc9e8ff97a69a1d27bbfe9283e..925c45f2b9fd20a9c12d6b74035f0a321437826a 100644 (file)
@@ -611,7 +611,7 @@ private:
 
   
 
-  static bool IsNonPragmaNonMacroLexer(const Lexer* L,
+  static bool IsFileLexer(const Lexer* L,
                                        const PreprocessorLexer* P) {
     if (L)
       return !L->isPragmaLexer();
@@ -619,12 +619,12 @@ private:
       return P != 0;
   }
 
-  static bool IsNonPragmaNonMacroLexer(const IncludeStackInfo& I) {
-    return IsNonPragmaNonMacroLexer(I.TheLexer, I.ThePPLexer);
+  static bool IsFileLexer(const IncludeStackInfo& I) {
+    return IsFileLexer(I.TheLexer, I.ThePPLexer);
   }
 
-  bool IsNonPragmaNonMacroLexer() const {
-    return IsNonPragmaNonMacroLexer(CurLexer.get(), CurPPLexer);
+  bool IsFileLexer() const {
+    return IsFileLexer(CurLexer.get(), CurPPLexer);
   }
   
   //===--------------------------------------------------------------------===//
index 42e44a593638ed4f4f331d68af0c5d1d1302a47f..0a7d2dba78f2cbc5f31b189397399fd9f4899fae 100644 (file)
@@ -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 (IsFileLexer()) {
     if ((CurFileEnt = SourceMgr.getFileEntryForID(CurPPLexer->getFileID())))
       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 (IsFileLexer(ISEntry)) {
       if ((CurFileEnt = 
            SourceMgr.getFileEntryForID(ISEntry.ThePPLexer->getFileID())))
         if ((FE = HeaderInfo.LookupSubframeworkHeader(FilenameStart,
index 973eced1cdb6b2bb5a1dc118af32de9beec5c0b2..a12309a7bfccce97c6e02437eb47399e37e7fde2 100644 (file)
@@ -30,14 +30,14 @@ PPCallbacks::~PPCallbacks() {}
 /// isInPrimaryFile - Return true if we're in the top-level file, not in a
 /// #include.  This looks through macro expansions and active _Pragma lexers.
 bool Preprocessor::isInPrimaryFile() const {
-  if (IsNonPragmaNonMacroLexer())
+  if (IsFileLexer())
     return IncludeMacroStack.empty();
   
   // If there are any stacked lexers, we're in a #include.
-  assert(IsNonPragmaNonMacroLexer(IncludeMacroStack[0]) &&
+  assert(IsFileLexer(IncludeMacroStack[0]) &&
          "Top level include stack isn't our primary lexer?");
   for (unsigned i = 1, e = IncludeMacroStack.size(); i != e; ++i)
-    if (IsNonPragmaNonMacroLexer(IncludeMacroStack[i]))
+    if (IsFileLexer(IncludeMacroStack[i]))
       return false;
   return true;
 }
@@ -46,13 +46,13 @@ bool Preprocessor::isInPrimaryFile() const {
 /// that this ignores any potentially active macro expansions and _Pragma
 /// expansions going on at the time.
 PreprocessorLexer *Preprocessor::getCurrentFileLexer() const {
-  if (IsNonPragmaNonMacroLexer())
+  if (IsFileLexer())
     return CurPPLexer;
   
   // Look for a stacked lexer.
   for (unsigned i = IncludeMacroStack.size(); i != 0; --i) {
     const IncludeStackInfo& ISI = IncludeMacroStack[i-1];
-    if (IsNonPragmaNonMacroLexer(ISI))
+    if (IsFileLexer(ISI))
       return ISI.ThePPLexer;
   }
   return 0;