[cfe-commits] r165083 - in /cfe/trunk: include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp tools/libclang/Indexing.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Oct 2 18:58:28 PDT 2012
Author: akirtzidis
Date: Tue Oct 2 20:58:28 2012
New Revision: 165083
URL: http://llvm.org/viewvc/llvm-project?rev=165083&view=rev
Log:
Some renames to use the 'visitor' nomenclature, no functionality change.
Modified:
cfe/trunk/include/clang/Frontend/ASTUnit.h
cfe/trunk/lib/Frontend/ASTUnit.cpp
cfe/trunk/tools/libclang/Indexing.cpp
Modified: cfe/trunk/include/clang/Frontend/ASTUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/ASTUnit.h?rev=165083&r1=165082&r2=165083&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/ASTUnit.h (original)
+++ cfe/trunk/include/clang/Frontend/ASTUnit.h Tue Oct 2 20:58:28 2012
@@ -615,13 +615,13 @@
/// \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);
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=165083&r1=165082&r2=165083&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Tue Oct 2 20:58:28 2012
@@ -2792,7 +2792,7 @@
PreprocessingRecord::iterator());
}
-bool ASTUnit::applyOnLocalTopLevelDecls(void *context, DeclReceiverFn Fn) {
+bool ASTUnit::visitLocalTopLevelDecls(void *context, DeclVisitorFn Fn) {
if (isMainFileAST()) {
serialization::ModuleFile &
Mod = Reader->getModuleManager().getPrimaryModule();
Modified: cfe/trunk/tools/libclang/Indexing.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/Indexing.cpp?rev=165083&r1=165082&r2=165083&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/Indexing.cpp (original)
+++ cfe/trunk/tools/libclang/Indexing.cpp Tue Oct 2 20:58:28 2012
@@ -472,7 +472,7 @@
}
}
-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 void indexTranslationUnit(ASTUnit &Unit, IndexingContext &IdxCtx) {
- Unit.applyOnLocalTopLevelDecls(&IdxCtx, topLevelDeclReceiver);
+ Unit.visitLocalTopLevelDecls(&IdxCtx, topLevelDeclVisitor);
}
static void indexDiagnostics(CXTranslationUnit TU, IndexingContext &IdxCtx) {
More information about the cfe-commits
mailing list