summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow multiple modules with the same name to coexist in the module cacheBen Langmuir2014-04-144-20/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To differentiate between two modules with the same name, we will consider the path the module map file that they are defined by* part of the ‘key’ for looking up the precompiled module (pcm file). Specifically, this patch renames the precompiled module (pcm) files from cache-path/<module hash>/Foo.pcm to cache-path/<module hash>/Foo-<hash of module map path>.pcm In addition, I’ve taught the ASTReader to re-resolve the names of imported modules during module loading so that if the header search context changes between when a module was originally built and when it is loaded we can rebuild it if necessary. For example, if module A imports module B first time: clang -I /path/to/A -I /path/to/B ... second time: clang -I /path/to/A -I /different/path/to/B ... will now rebuild A as expected. * in the case of inferred modules, we use the module map file that allowed the inference, not the __inferred_module.map file, since the inferred file path is the same for every inferred module. llvm-svn: 206201
* OnDiskHashTable: Make the iterable version separate.Justin Bogner2014-04-143-21/+25
| | | | | | | | | | | | | | | Currently the on disk hash table's key_iterator and data_iterator make the assumption that the table data starts exactly four bytes after the base of the table. This happens to be true for all of the tables we currently iterate over, but not for all of the OnDiskHashTables we currently use. For example, key_ and data_iterator would iterate over meaningless data if they were used on the hash tables in PTHLexer. We make the API safer by breaking this into two types. One doesn't have the iterators, and the other must be told where the payload starts. llvm-svn: 206189
* When module umbrellas change, rebuild themBen Langmuir2014-04-101-59/+63
| | | | | | | With the VFS, it is easy to hit modified umbrellas by overriding the umbrella header, and what we want is to rebuild, not to fail. llvm-svn: 205975
* [Preprocessor/CodeComplete] Don't add include guard macros to ↵Argyrios Kyrtzidis2014-04-092-0/+2
| | | | | | code-completion results. llvm-svn: 205917
* Have validate-system-headers override validate-once-per-build-sessionBen Langmuir2014-04-081-1/+1
| | | | llvm-svn: 205773
* [OPENMP][C++11] Renamed loop vars properly.Alexey Bataev2014-04-041-8/+8
| | | | llvm-svn: 205620
* [OPENMP] Small update for C++11Alexey Bataev2014-04-031-4/+2
| | | | llvm-svn: 205506
* [OPENMP] Implemented 'copyin' clauseAlexey Bataev2014-03-312-0/+22
| | | | llvm-svn: 205164
* Reapply "OnDiskHashTable: Use Endian.h to read little endian ostreams"Justin Bogner2014-03-282-62/+84
| | | | | | | | | | | | | Committed this by accident before it was done last time. Original message: Rather than rolling our own functions to read little endian data from a buffer, we can use the support in llvm's Endian.h. No functional change. llvm-svn: 205062
* Reapply "OnDiskHashTable: Use EndianStream.h to write little endian ostreams"Justin Bogner2014-03-282-65/+101
| | | | | | | | | | | | | Committed this by accident before it was done last time. Original message: Rather than rolling our own functions to write little endian data to an ostream, we can use the support in llvm's EndianStream.h. No functional change. llvm-svn: 205061
* Revert "OnDiskHashTable: Use Endian.h to read little endian ostreams"Justin Bogner2014-03-282-84/+62
| | | | | | This reverts commit r205045. llvm-svn: 205048
* Revert "OnDiskHashTable: Use EndianStream.h to write little endian ostreams"Justin Bogner2014-03-282-101/+65
| | | | | | This reverts commit r205044. llvm-svn: 205047
* OnDiskHashTable: Use Endian.h to read little endian ostreamsJustin Bogner2014-03-282-62/+84
| | | | | | | | | Rather than rolling our own functions to read little endian data from a buffer, we can use the support in llvm's Endian.h. No functional change. llvm-svn: 205045
* OnDiskHashTable: Use EndianStream.h to write little endian ostreamsJustin Bogner2014-03-282-65/+101
| | | | | | | | | Rather than rolling our own functions to write little endian data to an ostream, we can use the support in llvm's EndianStream.h. No functional change. llvm-svn: 205044
* Fix a FIXME, use std::move.Richard Smith2014-03-281-3/+3
| | | | llvm-svn: 205021
* Fix PR18307: Properly (de)serialize inherited constructors and their using ↵Stephan Tolksdorf2014-03-273-8/+29
| | | | | | | | declarations Reviewed in http://llvm-reviews.chandlerc.com/D3102 llvm-svn: 204951
* Comment parsing: when comment ranges are deserialized from multiple modules,Dmitri Gribenko2014-03-271-3/+4
| | | | | | | | | correctly order comments in SourceManager::isBeforeInTranslationUnit() order Unfortunately, this is not as simple as it was implemented previously, and actually requires doing a merge sort. llvm-svn: 204936
* Remove redundant and misleading check. This could also lead to painful cyclicRichard Smith2014-03-251-1/+1
| | | | | | deserialization. llvm-svn: 204695
* Save out a correct lookup table if a lookup table entry is stale (it containsRichard Smith2014-03-251-64/+76
| | | | | | | | | an out-of-date external decls list). This happens if we declare some names, force the lookup table for the decl context to be built, import a module that adds more decls for the name, then write out our module without looking up the name. llvm-svn: 204694
* If a name is injected into an imported inline namespace without reopening thatRichard Smith2014-03-231-3/+8
| | | | | | | namespace, we need to update both the visible names of that namespace and of its enclosing namespace set. llvm-svn: 204570
* When we inject a declaration into a namespace, add the primary DeclContext toRichard Smith2014-03-231-1/+2
| | | | | | | the update set rather than the current DeclContext. Add test for the local extern case too. llvm-svn: 204568
* If a template instantation introduces a name into a namespace, we need to writeRichard Smith2014-03-231-0/+12
| | | | | | | out a visible update record for that namespace even if it was never declared in this module. llvm-svn: 204554
* If an update record makes a declaration interesting, pass it to the consumer.Richard Smith2014-03-232-15/+25
| | | | llvm-svn: 204550
* Emit an update record if we instantiate the definition of a function templateRichard Smith2014-03-224-0/+62
| | | | | | | | specialization from a module. (This can also happen for function template specializations in PCHs if they're instantiated eagerly, because they're constexpr or have a deduced return type.) llvm-svn: 204547
* Fixing code that doesn't compile in MSVC 2012 (but does in MSVC 2013) from ↵Aaron Ballman2014-03-213-17/+25
| | | | | | r204417 and related commits. llvm-svn: 204471
* [OPENMP] parsing of clause 'safelen' (for directive 'omp simd')Alexey Bataev2014-03-212-0/+13
| | | | llvm-svn: 204428
* Serialize and deserialize mangling numbers.Richard Smith2014-03-213-4/+29
| | | | llvm-svn: 204423
* PR19215: When writing/reading a PCH that imported a module, store the locationRichard Smith2014-03-212-18/+36
| | | | | | | at which that PCH imported each visible submodule of the module. Such locations are needed when synthesizing macro directives resulting from the import. llvm-svn: 204417
* When the exception specification for a function in an imported PCH or module isRichard Smith2014-03-204-26/+67
| | | | | | resolved, emit an update record. llvm-svn: 204403
* Refactor and simplify DeclUpdates serialization.Richard Smith2014-03-202-72/+40
| | | | llvm-svn: 204397
* Refactor to move decl update emission into the decl emission loop.Richard Smith2014-03-201-15/+19
| | | | llvm-svn: 204392
* Rearrange serialization block order to put decl update emission into the sameRichard Smith2014-03-202-48/+52
| | | | | | | | block as decl and type emission. This allows decl updates include statements and expressions. No functionality change (but the generated PCM files are incompatible with earlier versions of Clang). llvm-svn: 204385
* [C++11] Replacing ObjCObjectType iterators qual_begin() and qual_end() with ↵Aaron Ballman2014-03-171-3/+2
| | | | | | iterator_range quals(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204047
* [C++11] Replacing CompoundStmt iterators body_begin() and body_end() with ↵Aaron Ballman2014-03-171-3/+2
| | | | | | iterator_range body(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204040
* Serialization: Directly compare objects instead of using a functor ↵Benjamin Kramer2014-03-151-38/+4
| | | | | | | | duplicating the compare operators. No functionality change. llvm-svn: 204006
* Fix PR18806: Canonicalize the replacement type when deserializing a ↵Stephan Tolksdorf2014-03-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | SubstTemplateTypeParmType What's going on in the test case (without the patch applied) is this: When the header is parsed, decltype(B()) is canonicalized to decltype(Y()), because that was the first parsed equivalent decltype expression. Hence, the TemplateSpecializationType for Id<decltype(B())> ends up with SubstTemplateTypeParmType(T, decltype(Y())) as the AliasedType member. When the PCH file is included and the AST reader reads Id<decltype(B())>, it sees decltype(B()) before decltype(Y()). So, this time decltype(B()) ends up being the canonical type for both decltypes, which leads to an assert violation when the reader calls getSubstTemplateTypeParmType with the non-canonical decltype(Y()) as the replacement type. Reviewers: rsmith Reviewed By: rsmith CC: cfe-commits, aemerson Differential Revision: http://llvm-reviews.chandlerc.com/D3073 llvm-svn: 204005
* [C++11] Removing the local_import_begin() and local_import_end() APIs and ↵Aaron Ballman2014-03-141-6/+2
| | | | | | replacing with a range-only local_imports() API. Privatizes the iterator class as well. llvm-svn: 203970
* [C++11] Replacing CapturedStmt iterators capture_init_begin() and ↵Aaron Ballman2014-03-141-4/+2
| | | | | | capture_init_end() with iterator_range capture_inits(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203959
* [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with ↵Aaron Ballman2014-03-141-3/+1
| | | | | | iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203958
* [C++11] Replacing CapturedStmt iterators capture_begin() and capture_end() ↵Aaron Ballman2014-03-142-13/+9
| | | | | | with iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203953
* Fix VS2012 build after r203881Hans Wennborg2014-03-141-1/+2
| | | | llvm-svn: 203951
* [C++11] Replacing OMPThreadPrivateDecl and OMPClause iterators ↵Aaron Ballman2014-03-142-16/+8
| | | | | | varlist_begin() and varlist_end() with iterator_range varlists(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203937
* [C++11] Replacing ObjCCategoryDecl iterators protocol_loc_begin() and ↵Aaron Ballman2014-03-141-4/+2
| | | | | | protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203923
* [C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-141-3/+2
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203922
* [C++11] Replacing ObjCProtocolDecl iterators protocol_loc_begin() and ↵Aaron Ballman2014-03-141-4/+2
| | | | | | protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203919
* [Modules] Emit the module file paths as dependencies of the PCH when we are ↵Argyrios Kyrtzidis2014-03-141-0/+7
| | | | | | | | | | | building one. This is because the PCH is tied to the module files, if one of the module files changes or gets removed the build system should re-build the PCH file. rdar://16321245 llvm-svn: 203885
* [Modules] Make sure that the synthesized file "__inferred_module.map" ↵Argyrios Kyrtzidis2014-03-141-6/+11
| | | | | | | | doesn't show up as dependency of a module file. Follow-up for rdar://15459210 llvm-svn: 203882
* Refactor ASTReader::readInputFileInfo to return a struct containing the ↵Argyrios Kyrtzidis2014-03-141-14/+15
| | | | | | | | related information. No functionality change. llvm-svn: 203881
* [C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-131-3/+2
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203863
* [C++11] Replacing ObjCInterfaceDecl iterators known_categories_begin() and ↵Aaron Ballman2014-03-131-6/+3
| | | | | | known_categories_end() with iterator_range known_categories(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203854
OpenPOWER on IntegriCloud