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

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 22 07:12:41 PDT 2017


xazax.hun created this revision.
Herald added a subscriber: mgorny.

This patch introduces a class that can help to build tools that require cross translation unit facilities.
This class allows function definitions to be loaded from external AST files based on an index.
In order to use this functionality an index is required. USRs are used as names to look up the functions. 
This class also does caching to avoid redundant loading of AST files.

Right now only function defnitions can be loaded using this API, because this is what the Static Analyzer requires.
In to future this could be extended to classes, types etc.

Note that, there is no tests right now for this functionality, but this is temporary.
Tets will come together with the first user once it is accepted: https://reviews.llvm.org/D30691


Repository:
  rL LLVM

https://reviews.llvm.org/D34512

Files:
  include/clang/Tooling/CrossTranslationUnit.h
  lib/Tooling/CMakeLists.txt
  lib/Tooling/CrossTranslationUnit.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34512.103569.patch
Type: text/x-patch
Size: 9499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170622/f951a05f/attachment.bin>


More information about the cfe-commits mailing list