diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2019-05-13 21:39:55 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2019-05-13 21:39:55 +0000 |
commit | 2ce598a44a353f159157d780721c6a08b4d35c60 (patch) | |
tree | 58eca5642aefaa29c6a56ab90818e3b08d30dddd /clang/tools/clang-import-test | |
parent | aeeeb37e373700350472d40cf0a0969b070be0a0 (diff) | |
download | bcm5719-llvm-2ce598a44a353f159157d780721c6a08b4d35c60.tar.gz bcm5719-llvm-2ce598a44a353f159157d780721c6a08b4d35c60.zip |
Introduce the ability to dump the AST to JSON.
This adds the -ast-dump=json cc1 flag (in addition to -ast-dump=default, which is the default if no dump format is specified), as well as some initial AST dumping functionality and tests.
llvm-svn: 360622
Diffstat (limited to 'clang/tools/clang-import-test')
-rw-r--r-- | clang/tools/clang-import-test/clang-import-test.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/tools/clang-import-test/clang-import-test.cpp b/clang/tools/clang-import-test/clang-import-test.cpp index b1078acdda9..cd9841241cb 100644 --- a/clang/tools/clang-import-test/clang-import-test.cpp +++ b/clang/tools/clang-import-test/clang-import-test.cpp @@ -316,8 +316,9 @@ llvm::Expected<CIAndOrigins> Parse(const std::string &Path, auto &CG = *static_cast<CodeGenerator *>(ASTConsumers.back().get()); if (ShouldDumpAST) - ASTConsumers.push_back(CreateASTDumper(nullptr /*Dump to stdout.*/, - "", true, false, false)); + ASTConsumers.push_back( + CreateASTDumper(nullptr /*Dump to stdout.*/, "", true, false, false, + clang::ADOF_Default)); CI.getDiagnosticClient().BeginSourceFile( CI.getCompilerInstance().getLangOpts(), |