Lines Matching +refs:clang +refs:prefix +refs:header
10 Using Pretokenized Headers with ``clang`` (Low-level Interface)
13 The Clang compiler frontend, ``clang -cc1``, supports three command line
16 To generate PTH files using ``clang -cc1``, use the option ``-emit-pth``:
20 $ clang -cc1 test.h -emit-pth -o test.h.pth
22 This option is transparently used by ``clang`` when generating PTH
23 files. Similarly, PTH files can be used as prefix headers using the
28 $ clang -cc1 -include-pth test.h.pth test.c -o test.s
31 "content" cache) of the source included by the original header file.
33 for *any* source files that are used by ``clang -cc1`` to process a
40 $ clang -cc1 -emit-pth test.h -o test.h.pth
43 $ clang -cc1 test.c -o test -token-cache test.h.pth
55 preprocessor state of a header file, Clang's pretokenized header files
67 checking the contents of header files. The current implementation of PCH
68 in Clang as pretokenized header files was motivated by the following
85 precompiled header file implementation that Clang can be directly
100 a lexical cache of header files, a single PTH file can be safely used
109 of ``clang -cc1`` can share the same pages in memory from a
125 While PTH can greatly speed up the processing time of a header file, the
126 amount of work required to process a header file is still roughly linear
127 in the size of the header file. In contrast, the amount of work done by
128 GCC to process a precompiled header is (theoretically) constant (the
129 ASTs for the header are literally memory mapped into the compiler). This
130 means that only the pieces of the header file that are referenced by the
131 source file including the header are the only ones the compiler needs to
135 an algorithmic level, especially when one considers header files of
148 header files by caching pre-lexed tokens, PTH also employs several other
149 optimizations to speed up the processing of header files:
152 ``stat`` that ``clang -cc1`` uses to resolve which files are included