diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-05 22:22:19 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-05 22:22:19 +0000 |
commit | 9eec4ed6ca0dcf098580da9146b97e0841556d12 (patch) | |
tree | 990b7278fb0983249a24c985f00fc4ff361a7d42 /include/clang/Index/Program.h | |
parent | 2c2ba3e258961dd98cacffe3a2167bb6d958fd53 (diff) |
Introduce the 'Index' library.
Its purpose is to provide the basic infrastructure for cross-translation-unit analysis like indexing, refactoring, etc.
Currently it is very "primitive" and with no type-names support. It can provide functionality like
"show me all references of this function from these translation units".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Index/Program.h')
-rw-r--r-- | include/clang/Index/Program.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/include/clang/Index/Program.h b/include/clang/Index/Program.h new file mode 100644 index 0000000000..30afa0be46 --- /dev/null +++ b/include/clang/Index/Program.h @@ -0,0 +1,43 @@ +//===--- Program.h - Entity originator and misc -----------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Storage for Entities and utility functions +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_INDEX_PROGRAM_H +#define LLVM_CLANG_INDEX_PROGRAM_H + +namespace clang { + class ASTContext; + +namespace idx { + class EntityHandler; + +/// \brief Repository for Entities. +class Program { + void *Impl; + + Program(const Program&); // do not implement + Program &operator=(const Program &); // do not implement + friend class Entity; + +public: + Program(); + ~Program(); + + /// \brief Traverses the AST and passes all the entities to the Handler. + void FindEntities(ASTContext &Ctx, EntityHandler *Handler); +}; + +} // namespace idx + +} // namespace clang + +#endif |