Some renames to use the 'visitor' nomenclature, no functionality change.

llvm-svn: 165083
This commit is contained in:
Argyrios Kyrtzidis 2012-10-03 01:58:28 +00:00
parent 23214e5046
commit e514b200aa
3 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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();

View File

@ -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) {