[PATCH] D121936: Ensure -extract-api handles multiple headers correctly

Daniel Grumberg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 17 11:12:40 PDT 2022


dang created this revision.
dang added reviewers: ributzka, zixuw, QuietMisdreavus, arphaman.
Herald added a project: All.
dang requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

clang -extract-api should accept multiple headers and forward them to a
single CC1 instance. This change introduces a new ExtractAPIJobAction.
Currently API Extraction is done during the Precompile phase as this is
the current phase that matches the requirements the most. Adding a new
phase would need to change some logic in how phases are scheduled. If
the headers scheduled for API extraction are of different types the
driver emits a diagnostic.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121936

Files:
  clang/include/clang/Basic/DiagnosticDriverKinds.td
  clang/include/clang/Driver/Action.h
  clang/include/clang/Driver/Phases.h
  clang/include/clang/Driver/Types.def
  clang/lib/Driver/Action.cpp
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/Phases.cpp
  clang/lib/Driver/ToolChain.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Driver/extract-api-multiheader.h
  clang/test/Driver/extract-api.c
  clang/test/Driver/extract-api.h
  clang/test/SymbolGraph/global_record.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121936.416260.patch
Type: text/x-patch
Size: 16622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220317/ab9d0a94/attachment.bin>


More information about the cfe-commits mailing list