[clang][extract-api] Enable processing of multiple headers
authorDaniel Grumberg <dgrumberg@apple.com>
Mon, 21 Mar 2022 19:41:29 +0000 (19:41 +0000)
committerDaniel Grumberg <dgrumberg@apple.com>
Wed, 23 Mar 2022 19:05:19 +0000 (19:05 +0000)
commitf833aab0d0bf1bd9e9903a1398e429f431532f5f
treec32dd0011f745d744bb202cdd1e29e899a9f40a5
parentebc8466481f938d799d0170e0caf1c7e64f52c53
[clang][extract-api] Enable processing of multiple headers

Before actually executing the ExtractAPIAction, clear the
CompilationInstance's input list and replace it with a single
synthesized file that just includes (or imports in ObjC) all the inputs.

Depends on D122141

Differential Revision: https://reviews.llvm.org/D122175
clang/include/clang/ExtractAPI/FrontendActions.h
clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
clang/test/ExtractAPI/global_record_multifile.c [new file with mode: 0644]