summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHContainerOperations.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move PCHContainerOperations from Frontend to SerializationRichard Trieu2018-12-121-69/+0
| | | | | | | Fix a layering violation. Frontend depends on Serialization, so anything used by both should be in Serialization. llvm-svn: 348907
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-1/+1
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
* Bitcode: Decouple block info block state from reader.Peter Collingbourne2016-11-081-3/+3
| | | | | | | | | | | | | | | | | As proposed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-October/106630.html Move block info block state to a new class, BitstreamBlockInfo. Clients may set the block info for a particular cursor with the BitstreamCursor::setBlockInfo() method. At this point BitstreamReader is not much more than a container for an ArrayRef<uint8_t>, so remove it and replace all uses with direct uses of memory buffers. Differential Revision: https://reviews.llvm.org/D26259 llvm-svn: 286207
* Bitcode: Change reader interface to take memory buffers.Peter Collingbourne2016-11-021-2/+1
| | | | | | | | | | | | | | | | | | | As proposed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-October/106595.html This change also fixes an API oddity where BitstreamCursor::Read() would return zero for the first read past the end of the bitstream, but would report_fatal_error for subsequent reads. Now we always report_fatal_error for all reads past the end. Updated clients to check for the end of the bitstream before reading from it. I also needed to add padding to the invalid bitcode tests in test/Bitcode/. This is because the streaming interface was not checking that the file size is a multiple of 4. Differential Revision: https://reviews.llvm.org/D26219 llvm-svn: 285773
* Frontend: Simplify ownership model for clang's output streams.Peter Collingbourne2016-07-151-5/+5
| | | | | | | | | | | | | | This changes the CompilerInstance::createOutputFile function to return a std::unique_ptr<llvm::raw_ostream>, rather than an llvm::raw_ostream implicitly owned by the CompilerInstance. This in most cases required that I move ownership of the output stream to the relevant ASTConsumer. The motivation for this change is to allow BackendConsumer to be a client of interfaces such as D20268 which take ownership of the output stream. Differential Revision: http://reviews.llvm.org/D21537 llvm-svn: 275507
* Apply clang-tidy's misc-move-constructor-init throughout Clang.Benjamin Kramer2016-05-271-2/+3
| | | | | | No functionality change intended, maybe a tiny performance improvement. llvm-svn: 270996
* Remove the egregious PCHContainer layering hack that doesn't seem to be ↵Benjamin Kramer2016-02-011-0/+3
| | | | | | necessary anymore. llvm-svn: 259355
* Further simplify the interface of PCHContainerGeneratorAdrian Prantl2015-09-191-3/+3
| | | | | | | | by dropping the const qualifier on the CI. NFC llvm-svn: 248101
* Simplify the interface of PCHContainerGenerator and friendsAdrian Prantl2015-09-181-14/+5
| | | | | | | | by passing in a CompilerInstance instead of all its individual members. NFC. llvm-svn: 248053
* Re-commit r247218: "Fix Clang-tidy misc-use-override warnings, other minor ↵Hans Wennborg2015-09-101-2/+4
| | | | | | | | fixes" This never broke the build; it was the LLVM side, r247216, that caused problems. llvm-svn: 247302
* Revert r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"Hans Wennborg2015-09-101-4/+2
| | | | | | | | | | | Seems it broke the Polly build. From http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly-fast/builds/11687/steps/compile/logs/stdio: In file included from /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/lib/TableGen/Record.cpp:14:0: /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:369:3: error: looser throw specifier for 'virtual llvm::TypedInit::~TypedInit()' /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:270:11: error: overriding 'virtual llvm::Init::~Init() noexcept (true)' llvm-svn: 247222
* Fix Clang-tidy misc-use-override warnings, other minor fixesHans Wennborg2015-09-101-2/+4
| | | | | | | | Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D12741 llvm-svn: 247218
* Make the clang module container format selectable from the command line.Adrian Prantl2015-07-171-13/+18
| | | | | | | | | | | | | - introduces a new cc1 option -fmodule-format=[raw,obj] with 'raw' being the default - supports arbitrary module container formats that libclang is agnostic to - adds the format to the module hash to avoid collisions - splits the old PCHContainerOperations into PCHContainerWriter and a PCHContainerReader. Thanks to Richard Smith for reviewing this patch! llvm-svn: 242499
* Revert r241770 and add Basic to the dependencies of clang-check instead.Adrian Prantl2015-07-091-3/+0
| | | | | | PR24067. llvm-svn: 241782
* Move the definition of ~PCHContainerOperations from Basic into Frontend.Adrian Prantl2015-07-091-0/+3
| | | | | | Fixes PR24067. llvm-svn: 241770
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-081-2/+0
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. llvm-svn: 241653
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-071-0/+2
| | | | | | failures. llvm-svn: 241642
* Wrap clang modules and pch files in an object file container.Adrian Prantl2015-07-071-2/+0
| | | | | | | | | | | | | This patch adds ObjectFilePCHContainerOperations uses the LLVM backend to put the contents of a PCH into a __clangast section inside a COFF, ELF, or Mach-O object file container. This is done to facilitate module debugging by makeing it possible to store the debug info for the types defined by a module alongside the AST. rdar://problem/20091852 llvm-svn: 241620
* Introduce a PCHContainerOperations interface (NFC).Adrian Prantl2015-06-201-0/+70
A PCHContainerOperations abstract interface provides operations for creating and unwrapping containers for serialized ASTs (precompiled headers and clang modules). The default implementation is RawPCHContainerOperations, which uses a flat file for the output. The main application for this interface will be an ObjectFilePCHContainerOperations implementation that uses LLVM to wrap the module in an ELF/Mach-O/COFF container to store debug info alongside the AST. rdar://problem/20091852 llvm-svn: 240225
OpenPOWER on IntegriCloud