]> granicus.if.org Git - clang/commit
Add Cross Translation Unit support library
authorGabor Horvath <xazax.hun@gmail.com>
Fri, 22 Sep 2017 11:11:01 +0000 (11:11 +0000)
committerGabor Horvath <xazax.hun@gmail.com>
Fri, 22 Sep 2017 11:11:01 +0000 (11:11 +0000)
commit6254bf4aded7574f297d7eaa82e54702b3820366
tree9bb9d6f8be39822b225a846a5403a3c4d5964f2f
parentd2eb6ef69c991be0aaf76afabd4c25c8050f9af2
Add Cross Translation Unit support library

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. The index format is a flat text file but it might be
replaced with a different solution in the near future. USRs are used as names to
look up the functions definitions. 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 in progress cross translation unit feature of the Static Analyzer
requires. In to future this might be extended to classes, types etc.

Differential Revision: https://reviews.llvm.org/D34512

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313975 91177308-0d34-0410-b5e6-96231b3b80d8
22 files changed:
include/clang/Basic/AllDiagnostics.h
include/clang/Basic/CMakeLists.txt
include/clang/Basic/Diagnostic.td
include/clang/Basic/DiagnosticCrossTUKinds.td [new file with mode: 0644]
include/clang/Basic/DiagnosticIDs.h
include/clang/CrossTU/CrossTUDiagnostic.h [new file with mode: 0644]
include/clang/CrossTU/CrossTranslationUnit.h [new file with mode: 0644]
lib/AST/ASTImporter.cpp
lib/Basic/DiagnosticIDs.cpp
lib/CMakeLists.txt
lib/CrossTU/CMakeLists.txt [new file with mode: 0644]
lib/CrossTU/CrossTranslationUnit.cpp [new file with mode: 0644]
test/Analysis/func-mapping-test.cpp [new file with mode: 0644]
test/CMakeLists.txt
test/lit.cfg.py
tools/CMakeLists.txt
tools/clang-func-mapping/CMakeLists.txt [new file with mode: 0644]
tools/clang-func-mapping/ClangFnMapGen.cpp [new file with mode: 0644]
tools/diagtool/DiagnosticNames.cpp
unittests/CMakeLists.txt
unittests/CrossTU/CMakeLists.txt [new file with mode: 0644]
unittests/CrossTU/CrossTranslationUnitTest.cpp [new file with mode: 0644]