summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PrecompiledPreamble.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added helper to get size of PrecompiledPreambleIlya Biryukov2017-12-211-3/+24
| | | | llvm-svn: 321266
* [clang] Add BeforeExecute method to PrecompiledPreambleIlya Biryukov2017-12-201-0/+2
| | | | | | | | | | | | | | | | | Summary: Adds BeforeExecute method to PrecompiledPreamble to be called before Execute(). This method can be overriden. Patch by William Enright. Reviewers: malaperle, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: arphaman, cfe-commits, ilya-biryukov Differential Revision: https://reviews.llvm.org/D41365 llvm-svn: 321189
* [clang] Add PPCallbacks list to preprocessor when building a preacompiled ↵Ilya Biryukov2017-12-151-17/+8
| | | | | | | | | | | | | | | | | | | | preamble. Summary: Revision D38639 needs this commit in order to properly make open definition calls on include statements work. Patch by William Enright. Reviewers: malaperle, krasimir, bkramer, ilya-biryukov Reviewed By: malaperle, ilya-biryukov Subscribers: cfe-commits, arphaman, ilya-biryukov Differential Revision: https://reviews.llvm.org/D39375 llvm-svn: 320804
* Avoid copying the data of in-memory preamblesIlya Biryukov2017-11-241-3/+1
| | | | | | | | | | | | | | Summary: Preambles are large and we should avoid copying them. Reviewers: bkramer, klimek Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D40302 llvm-svn: 318945
* Use llvm-config.h instead of config.hIlya Biryukov2017-11-171-1/+1
| | | | | | To fix standalone builds broken by r318411 (config.h is private to llvm). llvm-svn: 318514
* Allow to store precompiled preambles in memory.Ilya Biryukov2017-11-161-30/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: These preambles are built by ASTUnit and clangd. Previously, preambles were always stored on disk. In-memory preambles are routed back to the compiler as virtual files in a custom VFS. Interface of ASTUnit does not allow to use in-memory preambles, as ASTUnit::CodeComplete receives FileManager as a parameter, so we can't change VFS used by the compiler inside the CodeComplete method. A follow-up commit will update clangd in clang-tools-extra to use in-memory preambles. Reviewers: klimek, sammccall, bkramer Reviewed By: klimek Subscribers: ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D39842 llvm-svn: 318411
* Create fewer copies of StringMaps. No functionality change intended.Benjamin Kramer2017-10-221-1/+1
| | | | llvm-svn: 316301
* Set PreprocessorOpts.GeneratePreamble=true in PrecompiledPreamble.Ilya Biryukov2017-10-091-0/+2
| | | | | | | | | | | | | | | | Summary: It was previsouly set only in ASTUnit, but it should be set for all client of PrecompiledPreamble. Reviewers: erikjv, bkramer, klimek Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D38617 llvm-svn: 315212
* [PCH] Fixed preamble breaking with BOM presence (and particularly, ↵Cameron Desrochers2017-09-201-2/+1
| | | | | | | | | | | | | | fluctuating BOM presence) This patch fixes broken preamble-skipping when the preamble region includes a byte order mark (BOM). Previously, parsing would fail if preamble PCH generation was enabled and a BOM was present. This also fixes preamble invalidation when a BOM appears or disappears. This may seem to be an obscure edge case, but it happens regularly with IDEs that pass buffer overrides that never (or always) have a BOM, yet the underlying file from the initial parse that generated a PCH might (or might not) have a BOM. I've included a test case for these scenarios. Differential Revision: https://reviews.llvm.org/D37491 llvm-svn: 313796
* Fixed a race condition in PrecompiledPreamble.Ilya Biryukov2017-08-101-1/+9
| | | | | | | | | | | | | | | | Summary: Two PrecompiledPreambles, used in parallel on separate threads, could be writing preamble to the same temporary file. Reviewers: bkramer, krasimir, klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36529 llvm-svn: 310618
* Fix unused-variable compilation error.Haojian Wu2017-06-211-0/+2
| | | | llvm-svn: 305898
* Moved code hanlding precompiled preamble out of the ASTUnit.Ilya Biryukov2017-06-211-0/+561
Reviewers: bkramer, krasimir, arphaman, akyrtzi, klimek Reviewed By: klimek Subscribers: mgorny, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D34287 llvm-svn: 305890
OpenPOWER on IntegriCloud