Start adding support for generating CC1 command lines from CompilerInvocation
authorDaniel Grumberg <dany.grumberg@gmail.com>
Mon, 11 May 2020 10:42:38 +0000 (11:42 +0100)
committerDaniel Grumberg <dany.grumberg@gmail.com>
Wed, 24 Jun 2020 17:05:05 +0000 (18:05 +0100)
commit29125ddf1323951901184d2859274afdecac0327
tree53830c3d01333b73fc96679e5c8680ef5b62500a
parentceb298be40211a7235f73c7ff9f46603ca84fd6b
Start adding support for generating CC1 command lines from CompilerInvocation

This change includes the following:
- Add additional information in the relevant table-gen files to encode
the necessary information to automatically parse the argument into a
CompilerInvocation instance and to generate the appropriate command
line argument from a CompilerInvocation instance.
- Extend OptParserEmitter to emit the necessary macro tables as well as
constant tables to support parsing and generating command line
arguments for options that provide the necessary information.
- Port some options to use this new system for parsing and generating
command line arguments.

Differential Revision: https://reviews.llvm.org/D79796
clang/include/clang/Driver/CC1Options.td
clang/include/clang/Frontend/CompilerInvocation.h
clang/lib/Frontend/CompilerInvocation.cpp
clang/unittests/Frontend/CMakeLists.txt
clang/unittests/Frontend/CompilerInvocationTest.cpp [new file with mode: 0644]
llvm/include/llvm/Option/OptParser.td
llvm/utils/TableGen/OptParserEmitter.cpp