[clang][cli] Command line round-trip for HeaderSearch options
authorJan Svoboda <jan_svoboda@apple.com>
Thu, 4 Feb 2021 08:49:59 +0000 (09:49 +0100)
committerJan Svoboda <jan_svoboda@apple.com>
Thu, 4 Feb 2021 09:18:34 +0000 (10:18 +0100)
commit225ccf0c50a8d4e03b51f2f09a8e8776328363d8
tree3f655b5748196b081551fed1ca564a335fda289f
parente3f02302e318837d2421c6425450f04ae0a82b90
[clang][cli] Command line round-trip for HeaderSearch options

This patch implements generation of remaining header search arguments.
It's done manually in C++ as opposed to TableGen, because we need the flexibility and don't anticipate reuse.

This patch also tests the generation of header search options via a round-trip. This way, the code gets exercised whenever Clang is built and tested in asserts mode. All `check-clang` tests pass.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D94472
clang/CMakeLists.txt
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Driver/Options.td
clang/include/clang/Frontend/CompilerInvocation.h
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/Frontend/round-trip-cc1-args.c [new file with mode: 0644]
clang/tools/driver/cc1_main.cpp
llvm/include/llvm/Option/ArgList.h
llvm/lib/Option/ArgList.cpp