Lines Matching +refs:clang +refs:prefix +refs:header
12 Using Precompiled Headers with ``clang``
15 The Clang compiler frontend, ``clang -cc1``, supports two command line options
18 To generate PCH files using ``clang -cc1``, use the option `-emit-pch`:
22 $ clang -cc1 test.h -emit-pch -o test.h.pch
24 This option is transparently used by ``clang`` when generating PCH files. The
27 file can then be used as a prefix header with the `-include-pch`
32 $ clang -cc1 -include-pch test.h.pch test.c -o test.s
42 header (PCH file). Then, when compiling the source files in the project, we
43 load the PCH file first (as a prefix header), which acts as a stand-in for that
46 A precompiled header implementation improves performance when:
49 headers stored within the PCH file. Thus, a precompiled header design
51 should not vary with the size of the precompiled header file.
63 headers. In particular, there can only be one precompiled header and it must
79 larger AST file does not lead to longer AST load times. The actual header data
89 simple "Hello, World!" program that includes the Apple ``Cocoa.h`` header
90 (which is built as a precompiled header), this option illustrates how little of
91 the actual precompiled header is required:
110 precompiled header. These statistics can be useful to determine whether the
127 An AST file produced by clang is an object file container with a ``clangast``
142 The ``llvm-objdump`` utility provides a ``-raw-clang-ast`` option to extract the
157 an AST file. For example, a precompiled header built for a 32-bit x86 target
175 precompiled header (and vice-versa).
178 The full path of the header that was used to generate the AST file.
219 instantiation history inside the header itself.
223 the controlling macro for the header (e.g., when the preprocessor identified
224 that the contents of the header dependent on a macro like
234 defined by the end of the header used to build the AST file, along with the
276 within the precompiled header where that declaration is described.
301 ``p->x``, where ``p``'s type is defined in the precompiled header), Clang
466 of reparsing required after a change to the file, a form of precompiled header
473 compilation of that translation unit may already use a precompiled header: in
475 header that refers to the original precompiled header. This drastically
479 Chained precompiled headers get their name because each precompiled header can
480 depend on one other precompiled header, forming a chain of dependencies. A
481 translation unit will then include the precompiled header that starts the chain
484 precompiled header can provide information that overrides the information
485 provided by the precompiled headers it depends on, just like a header file
486 ``B.h`` that includes another header ``A.h`` can modify the state produced by
495 grow upward. Each precompiled header records the maximum ID number it has
496 assigned in each category. Then, when a new precompiled header is generated
497 that depends on (chains to) another precompiled header, it will start
502 When writing a chained precompiled header, Clang attempts to write only
503 information that has changed from the precompiled header on which it is
506 most-recent precompiled header. If no entry is found, lookup then proceeds
507 to the identifier table in the precompiled header it depends on, and so one.
512 There are various ways in which a later precompiled header can modify the
513 entities described in an earlier precompiled header. For example, later
517 stored in the chained precompiled header file and will be loaded along with
525 Modules generalize the chained precompiled header model yet further, from a