[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 23 03:26:49 PDT 2017


klimek added reviewers: dexonsmith, akyrtzi, benlangmuir, arphaman.
klimek added a comment.

Adding folks interested in the indexing discussion.



================
Comment at: include/clang/Tooling/CrossTranslationUnit.h:53-58
+  /// \p CrossTUDir directory, called \p IndexName. In case the declaration is
+  /// found in the index the corresponding AST file will be loaded and the
+  /// definition of the function will be merged into the original AST using
+  /// the AST Importer. The declaration with the definition will be returned.
+  ///
+  /// Note that the AST files should also be in the \p CrossTUDir.
----------------
In the future we'll want to create an index interface around this (which will probably serve also what the refactoring integration would be based on), instead of piping files and directories into all classes.

Perhaps we can start this by already pulling out a class ProjectIndex or somesuch,  with methods like loadASTDefining(...)?



https://reviews.llvm.org/D34512





More information about the cfe-commits mailing list