llvm.org GIT mirror llvm / 9f00cd9
Adding some very nascent information about the clang tablegen backends, with a promise to add more information later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204635 91177308-0d34-0410-b5e6-96231b3b80d8 Aaron Ballman 5 years ago
1 changed file(s) with 51 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
233233 ClangAttrClasses
234234 ----------------
235235
236 Generate clang attribute clases.
236 **Purpose**: Creates Attrs.inc, which contains semantic attribute class
237 declarations for any attribute in ``Attr.td`` that has not set ``ASTNode = 0``.
238 This file is included as part of ``Attr.h``.
237239
238240 ClangAttrParserStringSwitches
239241 -----------------------------
240242
241 Generate all parser-related attribute string switches.
243 **Purpose**: Creates AttrParserStringSwitches.inc, which contains
244 StringSwitch::Case statements for parser-related string switches. Each switch
245 is given its own macro (such as ``CLANG_ATTR_ARG_CONTEXT_LIST``, or
246 ``CLANG_ATTR_IDENTIFIER_ARG_LIST``), which is expected to be defined before
247 including AttrParserStringSwitches.inc, and undefined after.
242248
243249 ClangAttrImpl
244250 -------------
245251
246 Generate clang attribute implementations.
252 **Purpose**: Creates AttrImpl.inc, which contains semantic attribute class
253 definitions for any attribute in ``Attr.td`` that has not set ``ASTNode = 0``.
254 This file is included as part of ``AttrImpl.cpp``.
247255
248256 ClangAttrList
249257 -------------
250258
251 Generate a clang attribute list.
259 **Purpose**: Creates AttrList.inc, which is used when a list of semantic
260 attribute identifiers is required. For instance, ``AttrKinds.h`` includes this
261 file to generate the list of ``attr::Kind`` enumeration values. This list is
262 separated out into multiple categories: attributes, inheritable attributes, and
263 inheritable parameter attributes. This categorization happens automatically
264 based on information in ``Attr.td`` and is used to implement the ``classof``
265 functionality required for ``dyn_cast`` and similar APIs.
252266
253267 ClangAttrPCHRead
254268 ----------------
255269
256 Generate clang PCH attribute reader.
270 **Purpose**: Creates AttrPCHRead.inc, which is used to deserialize attributes
271 in the ``ASTReader::ReadAttributes`` function.
257272
258273 ClangAttrPCHWrite
259274 -----------------
260275
261 Generate clang PCH attribute writer.
262
263 ClangAttrSpellingList
276 **Purpose**: Creates AttrPCHWrite.inc, which is used to serialize attributes in
277 the ``ASTWriter::WriteAttributes`` function.
278
279 ClangAttrSpellings
264280 ---------------------
265281
266 Generate a clang attribute spelling list.
282 **Purpose**: Creates AttrSpellings.inc, which is used to implement the
283 ``__has_attribute`` feature test macro.
267284
268285 ClangAttrSpellingListIndex
269286 --------------------------
270287
271 Generate a clang attribute spelling index.
272
273 ClangAttrASTVisitor
288 **Purpose**: Creates AttrSpellingListIndex.inc, which is used to map parsed
289 attribute spellings (including which syntax or scope was used) to an attribute
290 spelling list index. These spelling list index values are internal
291 implementation details exposed via
292 ``AttributeList::getAttributeSpellingListIndex``.
293
294 ClangAttrVisitor
274295 -------------------
275296
276 Generate a recursive AST visitor for clang attribute.
297 **Purpose**: Creates AttrVisitor.inc, which is used when implementing
298 recursive AST visitors.
277299
278300 ClangAttrTemplateInstantiate
279301 ----------------------------
280302
281 Generate a clang template instantiate code.
303 **Purpose**: Creates AttrTemplateInstantiate.inc, which implements the
304 ``instantiateTemplateAttribute`` function, used when instantiating a template
305 that requires an attribute to be cloned.
282306
283307 ClangAttrParsedAttrList
284308 -----------------------
285309
286 Generate a clang parsed attribute list.
310 **Purpose**: Creates AttrParsedAttrList.inc, which is used to generate the
311 ``AttributeList::Kind`` parsed attribute enumeration.
287312
288313 ClangAttrParsedAttrImpl
289314 -----------------------
290315
291 Generate the clang parsed attribute helpers.
316 **Purpose**: Creates AttrParsedAttrImpl.inc, which is used by
317 ``AttributeList.cpp`` to implement several functions on the ``AttributeList``
318 class. This functionality is implemented via the ``AttrInfoMap ParsedAttrInfo``
319 array, which contains one element per parsed attribute object.
292320
293321 ClangAttrParsedAttrKinds
294322 ------------------------
295323
296 Generate a clang parsed attribute kinds.
324 **Purpose**: Creates AttrParsedAttrKinds.inc, which is used to implement the
325 ``AttributeList::getKind`` function, mapping a string (and syntax) to a parsed
326 attribute ``AttributeList::Kind`` enumeration.
297327
298328 ClangAttrDump
299329 -------------
300330
301 Generate clang attribute dumper.
331 **Purpose**: Creates AttrDump.inc, which dumps information about an attribute.
332 It is used to implement ``ASTDumper::dumpAttr``.
302333
303334 ClangDiagsDefs
304335 --------------
378409 AttrDocs
379410 --------
380411
381 Generate attribute documentation.
412 **Purpose**: Creates ``AttributeReference.rst`` from ``AttrDocs.td``, and is
413 used for documenting user-facing attributes.
382414
383415 How to write a back-end
384416 =======================