Skip to content

Commit 5f747ea

Browse files
committed
[Bridging PCH] Terminology clarification as suggested in review.
1 parent e1b0cc9 commit 5f747ea

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

docs/Lexicon.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,17 @@ source code, tests, and commit messages. See also the `LLVM lexicon`_.
231231
library on the system when the library on the system cannot be modified.
232232
Apple has a number of overlays for its own SDKs in stdlib/public/SDK/.
233233

234+
PCH
235+
Precompiled header, a type of file ending in .pch. A precompiled header is
236+
like a precompiled module, in the sense that it's the same file format and
237+
is just a cache file produced by clang and read by ``clang::ASTReader``. The
238+
difference is that PCH files are not "modular": they do not correspond to a
239+
named module, and cannot be read in any order or imported by module-name;
240+
rather they must be the first file parsed by the compiler. PCHs are used
241+
only to accelerate the process of reading C/C++/Objective-C headers, such as
242+
the bridging headers read in by the ``-import-objc-header`` command-line
243+
flag to swiftc.
244+
234245
PR
235246
1. "Problem Report": An issue reported in `LLVM's bug tracker`__.
236247
See also `SR`.

include/swift/AST/DiagnosticsClangImporter.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ WARNING(could_not_rewrite_bridging_header,none,
5454
"failed to serialize bridging header; "
5555
"target may not be debuggable outside of its original project", ())
5656
ERROR(bridging_header_pch_error,Fatal,
57-
"failed to emit PCH file '%0' for bridging header '%1'",
57+
"failed to emit precompiled header '%0' for bridging header '%1'",
5858
(StringRef, StringRef))
5959

6060
WARNING(invalid_swift_name_method,none,

0 commit comments

Comments
 (0)