From: Douglas Gregor Date: Wed, 3 Jun 2009 18:35:59 +0000 (+0000) Subject: Add a table of contents to the PCH design document X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=923cb23eabaf800a647dd9466ed68fe5b83c3250;p=clang Add a table of contents to the PCH design document git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72791 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/PCHInternals.html b/docs/PCHInternals.html index f1cfeb3673..7c0c1403fa 100644 --- a/docs/PCHInternals.html +++ b/docs/PCHInternals.html @@ -16,7 +16,26 @@ view, please see the User's Manual.

-

Using precompiled headers with clang-cc

+

Table of Contents

+ + +

Using Precompiled Headers with clang-cc

The low-level Clang compiler, clang-cc, supports two command line options for generating and using PCH files.

@@ -36,7 +55,7 @@ with the -include-pch option:

$ clang-cc -include-pch test.h.pch test.c -o test.s -

PCH Design Philosophy

+

Design Philosophy

Precompiled headers are meant to improve overall compile times for projects, so the design of precompiled headers is entirely driven by @@ -86,7 +105,7 @@ for a translation unit is proportional to the amount of code actually used from the header, rather than being proportional to the size of the header itself.

-

Precompiled Header Contents

+

Precompiled Header Contents

Precompiled header layout @@ -98,7 +117,7 @@ either a block or a record within . The contents of each of these logical blocks are described below.

-

Metadata Block

+

Metadata Block

The metadata block contains several records that provide information about how the precompiled header was built. This metadata @@ -143,7 +162,7 @@ contents are verified along with the rest of the metadata. -

Source Manager Block

+

Source Manager Block

The source manager block contains the serialized representation of Clang's -

Preprocessor Block

+

Preprocessor Block

The preprocessor block contains the serialized representation of the preprocessor. Specifically, it contains all of the macros that @@ -187,7 +206,7 @@ name of the macro first occurs in the program. This lazy loading of macro definitions is trigged by lookups into the identifier table.

-

Types Block

+

Types Block

The types block contains the serialized representation of all of the types referenced in the translation unit. Each Clang type node @@ -213,7 +232,7 @@ Clang's QualType class.

-

Declarations Block

+

Declarations Block

The declarations block contains the serialized representation of all of the declarations referenced in the translation unit. Each Clang @@ -276,7 +295,7 @@ the name-lookup and iteration behavior described above:

contain relatively few declarations in the common case. -

Statements and Expressions

+

Statements and Expressions

Statements and expressions are stored in the precompiled header in both the types and the -

Identifier Table Block

+

Identifier Table Block

The identifier table block contains an on-disk hash table that maps each identifier mentioned within the precompiled header to the @@ -351,7 +370,7 @@ hash table where that identifier is stored. This mapping is used when deserializing the name of a declaration, the identifier of a token, or any other construct in the PCH file that refers to a name.

-

Method Pool Block

+

Method Pool Block

The method pool block is represented as an on-disk hash table that serves two purposes: it provides a mapping from the names of @@ -374,6 +393,7 @@ values to the offset of the selector within the on-disk hash table, and will be used when de-serializing an Objective-C method declaration (or other Objective-C construct) that refers to the selector.

+