aboutsummaryrefslogtreecommitdiff
path: root/include/clang-c
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-02 16:10:38 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-10-02 16:10:38 +0000
commit2c3e05c266de0d4c465b58ffd129bd0b31604368 (patch)
tree208f2ff0a3e8f8bdf812c4774e5e4512b90005c6 /include/clang-c
parentd44e43e46f81cc83b8f1e4384724a9923426bb2a (diff)
[libclang] Implement the importedASTFile indexing callback to provide
info about imported modules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c')
-rw-r--r--include/clang-c/Index.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index c735781863..6ef028a077 100644
--- a/include/clang-c/Index.h
+++ b/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 *);