diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-02 16:10:38 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-02 16:10:38 +0000 |
| commit | 472eda06b00f4963dcdeb3e4417d2f2176e85c21 (patch) | |
| tree | b5b1939f7d983f9db117ecc65f4accac1ca35b20 /clang/include/clang-c | |
| parent | bc2724f6e044f486ba167a2a3fa32aff4d9def4e (diff) | |
| download | bcm5719-llvm-472eda06b00f4963dcdeb3e4417d2f2176e85c21.tar.gz bcm5719-llvm-472eda06b00f4963dcdeb3e4417d2f2176e85c21.zip | |
[libclang] Implement the importedASTFile indexing callback to provide
info about imported modules.
llvm-svn: 165020
Diffstat (limited to 'clang/include/clang-c')
| -rw-r--r-- | clang/include/clang-c/Index.h | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index c7357818634..6ef028a0777 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -4921,16 +4921,35 @@ typedef struct { * \brief Data for IndexerCallbacks#importedASTFile. */ typedef struct { + /** + * \brief Top level AST file containing the imported PCH, module or submodule. + */ CXFile file; /** - * \brief Location where the file is imported. It is useful mostly for - * modules. + * \brief Location where the file is imported. Applicable only for modules. */ CXIdxLoc loc; /** * \brief Non-zero if the AST file is a module otherwise it's a PCH. */ int isModule; + /** + * \brief Non-zero if an inclusion directive was automatically turned into + * a module import. + */ + int isIncludeDirective; + /** + * \brief The name of the file being included or the module being imported, + * as written in the source code. + */ + const char *sourceName; + /** + * \brief The actual name of the module or submodule being imported. + * The syntax is a sequence of identifiers separated by dots, e.g "std.vector" + * Applicable only for modules. + */ + const char *moduleName; + } CXIdxImportedASTFileInfo; typedef enum { @@ -5182,8 +5201,8 @@ typedef struct { * * AST files will not get indexed (there will not be callbacks to index all * the entities in an AST file). The recommended action is that, if the AST - * file is not already indexed, to block further indexing and initiate a new - * indexing job specific to the AST file. + * file is not already indexed, to initiate a new indexing job specific to + * the AST file. */ CXIdxClientASTFile (*importedASTFile)(CXClientData client_data, const CXIdxImportedASTFileInfo *); |

