summaryrefslogtreecommitdiffstats
path: root/include/clang/Frontend/PCHContainerOperations.h
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
* Move PCHContainerOperations from Frontend to SerializationRichard Trieu2018-12-121-103/+1
| | | | | | | | Fix a layering violation. Frontend depends on Serialization, so anything used by both should be in Serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348907 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove top-level using declaration from header files, as these aliases leak.Sam McCall2018-10-121-10/+8
| | | | | | | | | | Reviewers: ilya-biryukov Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D53135 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344337 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing spaceFangrui Song2018-07-301-4/+4
| | | | | | sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338291 91177308-0d34-0410-b5e6-96231b3b80d8
* Modules: Use hash of PCM content for SIGNATUREDuncan P. N. Exon Smith2017-03-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change ASTFileSignature from a random 32-bit number to the hash of the PCM content. - Move definition ASTFileSignature to Basic/Module.h so Module and ASTSourceDescriptor can use it. - Change the signature from uint64_t to std::array<uint32_t,5>. - Stop using (saving/reading) the size and modification time of PCM files when there is a valid SIGNATURE. - Add UNHASHED_CONTROL_BLOCK, and use it to store the SIGNATURE record and other records that shouldn't affect the hash. Because implicit modules reuses the same file for multiple levels of -Werror, this includes DIAGNOSTIC_OPTIONS and DIAG_PRAGMA_MAPPINGS. This helps to solve a PCH + implicit Modules dependency issue: PCH files are handled by the external build system, whereas implicit modules are handled by internal compiler build system. This prevents invalidating a PCH when the compiler overwrites a PCM file with the same content (modulo the diagnostic differences). Design and original patch by Manman Ren! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297655 91177308-0d34-0410-b5e6-96231b3b80d8
* Bitcode: Decouple block info block state from reader.Peter Collingbourne2016-11-081-8/+4
| | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286207 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Simplify ownership model for clang's output streams.Peter Collingbourne2016-07-151-8/+12
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275507 91177308-0d34-0410-b5e6-96231b3b80d8
* Module Debugging: Use the clang module signature as the module's dwo_idAdrian Prantl2015-09-221-1/+2
| | | | | | | | | | | when building a module. Clang already records the module signature when building a skeleton CU to reference a clang module. Matching the id in the skeleton with the one in the module allows a DWARF consumer to verify that they found the correct version of the module without them needing to know about the clang module format. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248345 91177308-0d34-0410-b5e6-96231b3b80d8
* Further simplify the interface of PCHContainerGeneratorAdrian Prantl2015-09-191-6/+5
| | | | | | | | by dropping the const qualifier on the CI. NFC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248101 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the interface of PCHContainerGenerator and friendsAdrian Prantl2015-09-181-13/+7
| | | | | | | | by passing in a CompilerInstance instead of all its individual members. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248053 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the clang module container format selectable from the command line.Adrian Prantl2015-07-171-12/+60
| | | | | | | | | | | | | - 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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242499 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a PCHContainerOperations interface (NFC).Adrian Prantl2015-06-201-0/+76
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240225 91177308-0d34-0410-b5e6-96231b3b80d8