diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2018-05-31 13:57:09 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2018-05-31 13:57:09 +0000 |
commit | 16ed8dd823a4c2282425d081e1817d9dc205775e (patch) | |
tree | 010f16011621b4b3d51b0408ea6e0c7b5c521d01 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | d657c2564980cb4ad763c49bf5181c1311824085 (diff) | |
download | llvm-16ed8dd823a4c2282425d081e1817d9dc205775e.zip llvm-16ed8dd823a4c2282425d081e1817d9dc205775e.tar.gz llvm-16ed8dd823a4c2282425d081e1817d9dc205775e.tar.bz2 |
Add a new driver mode to dump compiler feature and extension options.
Add the ability to dump compiler option-related information to a JSON file via the -compiler-options-dump option. Specifically, it dumps the features/extensions lists -- however, this output could be extended to other information should it be useful. In order to support features and extensions, I moved them into a .def file so that we could build the various lists we care about from them without a significant increase in maintenance burden.
llvm-svn: 333653
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 1bb939a..ac2ee50 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -45,6 +45,8 @@ CreateFrontendBaseAction(CompilerInstance &CI) { case ASTDump: return llvm::make_unique<ASTDumpAction>(); case ASTPrint: return llvm::make_unique<ASTPrintAction>(); case ASTView: return llvm::make_unique<ASTViewAction>(); + case DumpCompilerOptions: + return llvm::make_unique<DumpCompilerOptionsAction>(); case DumpRawTokens: return llvm::make_unique<DumpRawTokensAction>(); case DumpTokens: return llvm::make_unique<DumpTokensAction>(); case EmitAssembly: return llvm::make_unique<EmitAssemblyAction>(); |