You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Info` can not only represent direct AST symbols but also {cpp} constructs that need to be inferred from these symbols.
106
106
Nodes in the first category will typically be created in the initial extraction step, and nodes in the second category will be created in the finalization step.
107
107
108
-
When defining a new `Info` type, it is important to consider how this type will be supported in all other modules of the codebase, including the AST visitor, the bitcode writer, generators, tests, and the documentation.
108
+
When defining a new `Info` type, it is important to consider how this type will be supported in all other modules of the codebase, including the AST visitor, generators, tests, and the documentation.
109
109
The script `.github/check_info_nodes_support.sh` will attempt to infer whether most of these features have been implemented for each node type.
110
110
111
111
==== Clang LibTooling
@@ -145,19 +145,13 @@ It is during this stage that USRs (universal symbol references) are generated an
145
145
Except for built-in types, *all* entities referenced in the corpus will be traversed and be assigned a `SymbolID`; including those from the standard library.
146
146
This is necessary to generate the full interface for user-defined types.
147
147
148
-
==== Bitcode
149
-
150
-
To maximize the size of the code base MrDocs is capable of processing, `Info`
151
-
types generated during traversal are serialized to a compressed bitcode representation.
152
-
153
-
The `ASTVisitor` reports each new `Info` object to the `BitcodeExecutionContext` (`src/lib/Lib/ExecutionContext.cpp`) which serializes it to the bitcode file.
154
-
155
148
==== Finalizing the Corpus
156
149
157
150
After running the AST traversal on all translation units, `CorpusImpl::build` contains finalization steps for the `Corpus` object.
158
151
At this point, we process C++ constructs that are not directly represented in the AST.
159
152
160
-
The first finalization step happens in `BitcodeExecutionContext::reportEnd` (`src/lib/Lib/ExecutionContext.cpp`), where the `Info` objects with the same `SymbolID` are merged.
153
+
The first finalization step happens in `CorpusImpl::build` (`src/lib/Lib/CorpusImpl.cpp`), where the `Info` objects from a single translation unit
154
+
are merged into a map containing the merged results from all other TUs.
161
155
The merging step is necessary as there may be multiple identical definitions of the same entity.
162
156
For instance, this represents the case where a function is declared at different points in the code base and might have different attributes or comments.
163
157
At this step, the doc comments are also finalized.
0 commit comments