• Home
  • Raw
  • Download

Lines Matching refs:AST

60 headers to save a serialized AST file (one per module) and use those AST
65 AST file format required for modules are discussed in the section on
68 Clang's AST files are designed with a compact on-disk representation, which
69 minimizes both creation time and the time required to initially load the AST
70 file. The AST file itself contains a serialized representation of Clang's
75 Clang's AST files are loaded "lazily" from disk. When an AST file is initially
76 loaded, Clang reads only a small amount of data from the AST file to establish
78 this initial load is independent of the size of the AST file, such that a
79 larger AST file does not lead to longer AST load times. The actual header data
80 in the AST file --- macros, functions, variables, types, etc. --- is loaded
82 entity (and those entities it depends on) are deserialized from the AST file.
83 With this approach, the cost of using an AST file for a translation unit is
84 proportional to the amount of code actually used from the AST file, rather than
85 being proportional to the size of the AST file itself.
88 describing how much of the AST file was actually loaded from disk. For a
95 *** AST File Statistics:
111 AST file implementation can be improved by making more of the implementation
124 AST File Contents
127 An AST file produced by clang is an object file container with a ``clangast``
128 (COFF) or ``__clangast`` (ELF and Mach-O) section containing the serialized AST.
130 debug information for the data types defined in the AST. Tools built on top of
131 libclang that do not need debug information may also produce raw AST files that
132 only contain the serialized AST.
143 binary contents of the AST section from an object file container.
146 utility can be used to examine the actual structure of the bitstream for the AST
148 the AST section and to isolate areas where the AST representation can still be
156 the AST file was built. This metadata is primarily used to validate the use of
157 an AST file. For example, a precompiled header built for a 32-bit x86 target
162 Describes the particular language dialect used to compile the AST file,
169 which the AST file was generated, e.g., ``i386-apple-darwin9``.
171 AST version
172 The major and minor version numbers of the AST file format. Changes in the
178 The full path of the header that was used to generate the AST file.
182 is used in the validation of the AST file. The predefines buffer itself
192 of all AST files that this AST file depends on. Each of those files will be
193 loaded along with this AST file.
207 column/line positions within a source file or macro instantiation. The AST
209 of the headers that were (transitively) included when building the AST file.
216 maps file IDs to the position within the AST file where the information about
222 that were included when building the AST file. This includes information about
234 defined by the end of the header used to build the AST file, along with the
236 from the AST file when the name of the macro first occurs in the program. This
247 ``FunctionProtoType``, etc.) has a corresponding record type in the AST file.
248 When types are deserialized from the AST file, the data within the record is
249 used to reconstruct the appropriate type node using the AST context.
255 ``NUM_PREDEF_TYPE_IDS`` upward as the types are encountered. The AST file has
259 the AST file, that reference is encoded using the type ID shifted left by 3
271 AST file. When declarations are deserialized from the AST file, the data
274 numeric ID that is used to refer to that declaration within the AST file. In
290 In Clang's AST file format, deserializing a declaration that is a
319 Statements and expressions are stored in the AST file in both the :ref:`types
329 record type in the AST file, which contains the serialized representation of
332 size). Within the AST file, the subexpressions of an expression are stored, in
366 identifier mentioned within the AST file to the serialized representation of
379 When an AST file is loaded, the AST file reader mechanism introduces itself
385 same contents it would have after parsing the headers in the AST file.
387 Within the AST file, the identifiers used to name declarations are represented
391 a declaration, the identifier of a token, or any other construct in the AST
403 stores all of the selectors used by entities within the AST file. The design
412 As with identifiers, selectors are represented by numeric values within the AST
418 AST Reader Integration Points
421 The "lazy" deserialization behavior of AST files requires their integration
424 routines be able to query the AST file to find entities stored there.
426 For each Clang data structure that requires direct interaction with the AST
428 the two modules. The ``ASTReader`` class, which handles the loading of an AST
441 been seen. In this case, the AST reader searches for this identifier within
447 used whenever the abstract syntax tree nodes need to loaded from the AST
489 There are several ways in which chained precompiled headers generalize the AST
499 an ID number, which AST file actually contains the entity.
527 (DAG) of AST files. All of the same techniques used to make chained
539 entities. The AST reader then maps these "local" ID numbers into a "global"
541 between entities (in whatever AST file they inhabit) and global ID numbers.
542 If that translation unit is then serialized into an AST file, this mapping
543 will be stored for use when the AST file is imported.
552 declarations, but the AST nodes are unrelated. This would result in a
553 compilation error, due to an ambiguity in name lookup. Therefore, the AST
562 visible to its clients. The AST reader maintains a "visible" bit on various
563 AST nodes (declarations, macros, etc.) to indicate whether that particular
564 AST node is currently visible; the various name lookup mechanisms in Clang
566 the AST (because other, visible AST nodes may depend on it), can actually be
568 existing, non-visible, already-deserialized AST nodes visible; it is the
569 responsibility of the AST reader to find and update these AST nodes when it