summaryrefslogtreecommitdiffstats
path: root/include/clang/Lex
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2018-07-09 11:33:23 +0000
committerIlya Biryukov <ibiryukov@google.com>2018-07-09 11:33:23 +0000
commitb5784f85be57b6010e656f881e64ac3d2ad25f6a (patch)
tree8a33586103e9be07497a554309b231ff3ba6281f /include/clang/Lex
parent9ac30449eb6ff992f22e86c42ea7d626e4ef6973 (diff)
[PCH] Add an option to not write comments into PCH
Summary: Will be used in clangd, see the follow-up change. Clangd does not use comments read from PCH to avoid crashes due to changed contents of the file. However, reading them considerably slows down code completion on files with large preambles. Reviewers: sammccall Reviewed By: sammccall Subscribers: ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D48942 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex')
-rw-r--r--include/clang/Lex/PreprocessorOptions.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Lex/PreprocessorOptions.h b/include/clang/Lex/PreprocessorOptions.h
index f4ec2f27c4..3d7e5ab4a8 100644
--- a/include/clang/Lex/PreprocessorOptions.h
+++ b/include/clang/Lex/PreprocessorOptions.h
@@ -95,6 +95,11 @@ public:
/// processing the rest of the file.
bool GeneratePreamble = false;
+ /// Whether to write comment locations into the PCH when building it.
+ /// Reading the comments from the PCH can be a performance hit even if the
+ /// clients don't use them.
+ bool WriteCommentListToPCH = true;
+
/// The implicit PTH input included at the start of the translation unit, or
/// empty.
std::string ImplicitPTHInclude;