Commit Graph

5 Commits

Author SHA1 Message Date
AG
ff9d3ef073 Merge pull request #29568 from bitjammer/acgarland/rdar-59055039-ssg-pass-xcc
Pass -Xcc flags through swift-symbolgraph-extract
2020-02-05 09:48:51 -08:00
Ashley Garland
7030301ae1 Pass -Xcc flags through swift-symbolgraph-extract
rdar://problem/59055039
2020-01-31 13:39:45 -08:00
Ashley Garland
81b4d84ee9 swift-symbolgraph-extract: Mark required args
- Mark required arguments
- Print help usage on zero args

rdar://problem/58770554
2020-01-31 13:38:50 -08:00
Saleem Abdulrasool
ee86c15f5c Driver: IWYU swift-symbolgraph-extract
This is needed to build on swift/master-rebranch.
2020-01-12 12:02:30 -08:00
Ashley Garland
7a3a0a9e23 Symbol graph support
Adds a tool `swift-symbolgraph-extract` that reads an existing Swift
module and prints a platform- and language-agnostic JSON description of
the module, primarly for documentation.

Adds a small sub-library `SymbolGraphGen` which houses the core
implementation for collecting relevant information about declarations.
The main entry point is integrated directly into the driver as a mode:
the tool is meant to be run outside of the normal edit-compile-run/test
workflow to avoid impacting build times.

Along with common options for other tools, unique options include
`pretty-print` for debugging, and a `minimum-access-level` options for
including internal documentation.

A symbol graph is a directed graph where the nodes are symbols in a
module and the edges are relationships between them. For example, a
`struct S` may have a member `var x`. The graph would have two nodes for
`S` and `x`, and one "member-of" relationship edge. Other relationship
kinds include "inherits-from" or "conforms to". The data format for a
symbol graph is still under development and may change without notice
until a specificiation and versioning scheme is published.

Various aspects about a symbol are recorded in the nodes, such as
availability, documentation comments, or data needed for printing the
shapes of declarations without having to understand specifics about the
langauge.

Implicit and public-underscored stdlib declarations are not included by
default.

rdar://problem/55346798
2020-01-10 09:53:37 -08:00