summaryrefslogtreecommitdiffstats
path: root/clang/tools/CMakeLists.txt
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2016-12-16 23:21:38 +0000
committerSean Callanan <scallanan@apple.com>2016-12-16 23:21:38 +0000
commitfe929aa33c226b8d60268420f78fc38d783ec5e5 (patch)
tree1cf1a658de3825930b1340bc8372217865186463 /clang/tools/CMakeLists.txt
parent3b8011f1080be9a57d4d5ae48d0d1255880f8baf (diff)
downloadbcm5719-llvm-fe929aa33c226b8d60268420f78fc38d783ec5e5.tar.gz
bcm5719-llvm-fe929aa33c226b8d60268420f78fc38d783ec5e5.zip
Testbed and skeleton of a new expression parser
LLVM's JIT is now the foundation of dynamic-compilation features for many languages. Clang also has low-level support for dynamic compilation (ASTImporter and ExternalASTSource, notably). How the compiler is set up for dynamic parsing is generally left up to individual clients, for example LLDB's C/C++/Objective-C expression parser and the ROOT project. Although this arrangement offers external clients the flexibility to implement dynamic features as they see fit, the lack of an in-tree client means that subtle bugs can be introduced that cause regressions in the external clients but aren't caught by tests (or users) until much later. LLDB for example regularly encounters complicated ODR violation scenarios where it is not immediately clear who is at fault. Other external clients (notably, Cling) rely on similar functionality, and another goal is to break this functionality up into composable parts so that any client can be built easily on top of Clang without requiring extensive additional code. I propose that the parts required to build a simple expression parser be added to Clang. Initially, I aim to have the following features: - A piece that looks up external declarations from a variety of sources (e.g., from previous dynamic compilations, from modules, or from DWARF) and uses clear conflict resolution rules to reconcile differences, with easily understood errors. This functionality will be supported by in-tree tests. - A piece that works hand in hand with the LLVM JIT to resolve the locations of external declarations so that e.g. variables can be redeclared and (for high-performance applications like DTrace) external variables can be accessed directly from the registers where they reside. This commit adds a tester that parses a sequence of source files and then uses them as source data for an expression. External references are resolved using an ExternalASTSource that responds to name queries using an ASTImporter. This is the setup that LLDB uses, and the motivating reason for MinimalImport in ASTImporter. When complete, this tester will implement the first of the above goals. Differential Revision: https://reviews.llvm.org/D27180 llvm-svn: 290004
Diffstat (limited to 'clang/tools/CMakeLists.txt')
-rw-r--r--clang/tools/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/tools/CMakeLists.txt b/clang/tools/CMakeLists.txt
index b8850e45468..b0c97f0f1e4 100644
--- a/clang/tools/CMakeLists.txt
+++ b/clang/tools/CMakeLists.txt
@@ -5,6 +5,7 @@ add_clang_subdirectory(driver)
add_clang_subdirectory(clang-format)
add_clang_subdirectory(clang-format-vs)
add_clang_subdirectory(clang-fuzzer)
+add_clang_subdirectory(clang-import-test)
add_clang_subdirectory(clang-offload-bundler)
add_clang_subdirectory(c-index-test)
OpenPOWER on IntegriCloud