diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-03 01:58:28 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-03 01:58:28 +0000 |
| commit | e514b200aa6770b9a0516f4185744974cf17cff6 (patch) | |
| tree | f88cf6ff7528e39e92cfa6794268b4404fb3e489 | |
| parent | 23214e504600c6e949a2181f29f6adb8b5d57686 (diff) | |
| download | bcm5719-llvm-e514b200aa6770b9a0516f4185744974cf17cff6.tar.gz bcm5719-llvm-e514b200aa6770b9a0516f4185744974cf17cff6.zip | |
Some renames to use the 'visitor' nomenclature, no functionality change.
llvm-svn: 165083
| -rw-r--r-- | clang/include/clang/Frontend/ASTUnit.h | 4 | ||||
| -rw-r--r-- | clang/lib/Frontend/ASTUnit.cpp | 2 | ||||
| -rw-r--r-- | clang/tools/libclang/Indexing.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/clang/include/clang/Frontend/ASTUnit.h b/clang/include/clang/Frontend/ASTUnit.h index 454bf512923..e6ef410be45 100644 --- a/clang/include/clang/Frontend/ASTUnit.h +++ b/clang/include/clang/Frontend/ASTUnit.h @@ -615,13 +615,13 @@ public: /// \brief Type for a function iterating over a number of declarations. /// \returns true to continue iteration and false to abort. - typedef bool (*DeclReceiverFn)(void *context, const Decl *D); + typedef bool (*DeclVisitorFn)(void *context, const Decl *D); /// \brief Iterate over local declarations (locally parsed if this is a parsed /// source file or the loaded declarations of the primary module if this is an /// AST file). /// \returns true if the iteration was complete or false if it was aborted. - bool applyOnLocalTopLevelDecls(void *context, DeclReceiverFn Fn); + bool visitLocalTopLevelDecls(void *context, DeclVisitorFn Fn); llvm::MemoryBuffer *getBufferForFile(StringRef Filename, std::string *ErrorStr = 0); diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index eaad06a36ea..79559a3dcdb 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -2792,7 +2792,7 @@ ASTUnit::getLocalPreprocessingEntities() const { PreprocessingRecord::iterator()); } -bool ASTUnit::applyOnLocalTopLevelDecls(void *context, DeclReceiverFn Fn) { +bool ASTUnit::visitLocalTopLevelDecls(void *context, DeclVisitorFn Fn) { if (isMainFileAST()) { serialization::ModuleFile & Mod = Reader->getModuleManager().getPrimaryModule(); diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp index 598dbce7b65..6b9abbcf03b 100644 --- a/clang/tools/libclang/Indexing.cpp +++ b/clang/tools/libclang/Indexing.cpp @@ -472,7 +472,7 @@ static void indexPreprocessingRecord(ASTUnit &Unit, IndexingContext &IdxCtx) { } } -static bool topLevelDeclReceiver(void *context, const Decl *D) { +static bool topLevelDeclVisitor(void *context, const Decl *D) { IndexingContext &IdxCtx = *static_cast<IndexingContext*>(context); IdxCtx.indexTopLevelDecl(D); if (IdxCtx.shouldAbort()) @@ -481,7 +481,7 @@ static bool topLevelDeclReceiver(void *context, const Decl *D) { } static void indexTranslationUnit(ASTUnit &Unit, IndexingContext &IdxCtx) { - Unit.applyOnLocalTopLevelDecls(&IdxCtx, topLevelDeclReceiver); + Unit.visitLocalTopLevelDecls(&IdxCtx, topLevelDeclVisitor); } static void indexDiagnostics(CXTranslationUnit TU, IndexingContext &IdxCtx) { |

