This is an archive of the discontinued LLVM Phabricator instance.

[clang][extract-api] Enable processing of multiple headers
ClosedPublic

Authored by dang on Mar 21 2022, 1:29 PM.

Details

Summary

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

Diff Detail

Event Timeline

dang created this revision.Mar 21 2022, 1:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2022, 1:29 PM
dang requested review of this revision.Mar 21 2022, 1:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2022, 1:29 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dang added a comment.Mar 21 2022, 1:31 PM

This is up as a "draft" right now. I am waiting on https://reviews.llvm.org/D122160 to land before doing a final rebase.

zixuw accepted this revision.Mar 22 2022, 4:54 PM
This revision is now accepted and ready to land.Mar 22 2022, 4:54 PM
ributzka added inline comments.Mar 22 2022, 5:58 PM
clang/include/clang/SymbolGraph/FrontendActions.h
35 ↗(On Diff #417073)

This comment confused me a bit. By looking at the code further down, it only adds include statements for each header, which is different from merging all headers into a single header/buffer.

dang updated this revision to Diff 417593.Mar 23 2022, 6:45 AM

Rebase on top of latest changes.

dang updated this revision to Diff 417596.Mar 23 2022, 7:03 AM

Clarify doc comment for ExtractAPIAction::PrepareToExecuteAction

dang marked an inline comment as done.Mar 23 2022, 7:03 AM
dang added inline comments.
clang/include/clang/SymbolGraph/FrontendActions.h
35 ↗(On Diff #417073)

You are right in that is a bit confusing. I have reworded this to reflect what is actually happening more accurately.

This revision was automatically updated to reflect the committed changes.
dang marked an inline comment as done.