summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
Commit message (Collapse)AuthorAgeFilesLines
...
* [modules] Avoid the possibility of a redeclaration chain not being marked 'upRichard Smith2015-02-271-3/+2
| | | | | | to date' after it gets updated. llvm-svn: 230789
* [modules] Don't write out name lookup table entries merely because the moduleRichard Smith2015-02-271-10/+13
| | | | | | happened to query them; only write them out if something new was added. llvm-svn: 230727
* [modules] For an inheriting constructor, the inherited constructor is stored inRichard Smith2015-02-271-1/+2
| | | | | | | a map keyed off the canonical declaration. Don't try to set it if we're loading some non-canonical merged declaration. llvm-svn: 230716
* [modules] When loading in multiple canonical definitions of a template,Richard Smith2015-02-271-58/+43
| | | | | | | accumulate the set of specializations rather than overwriting one list with another. llvm-svn: 230712
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-255-43/+24
| | | | llvm-svn: 230454
* Remove slow and apparently pointless updating of all identifiers at the startRichard Smith2015-02-251-17/+0
| | | | | | of writing out an AST file. llvm-svn: 230428
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-255-24/+43
| | | | | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. This reapplies r230044 with a fixed configure+make build and updated dependencies and testcase requirements. Over the last iteration this version adds - missing target requirements for testcases that specify an x86 triple, - a missing clangCodeGen.a dependency to libClang.a in the make build. rdar://problem/19104245 llvm-svn: 230423
* Make RedeclarableResult's ownership-transferring constructor be a moveRichard Smith2015-02-251-4/+4
| | | | | | constructor. llvm-svn: 230417
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-245-43/+24
| | | | | | | This reverts commit r230305. Off to fix another round of missing dependencies on various platforms. llvm-svn: 230309
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-245-24/+43
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 3. llvm-svn: 230305
* Cleanup: remove artificial division between lookup results and const lookupRichard Smith2015-02-211-1/+1
| | | | | | | results. No-one was ever modifying a lookup result, and it would not be reasonable to do so. llvm-svn: 230123
* Revert r167816 and replace it with a proper fix for the issue: do notRichard Smith2015-02-211-4/+2
| | | | | | | invalidate lookup_iterators and lookup_results for some name within a DeclContext if the lookup results for a *different* name change. llvm-svn: 230121
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-215-43/+24
| | | | | | | | This reverts commit 230099. The Linux configure+make build variant still needs some work. llvm-svn: 230103
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-205-24/+43
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 2. llvm-svn: 230089
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-205-43/+24
| | | | | | | | This reverts commit r230067. Investigating another batch of problems found by the bots. llvm-svn: 230073
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-205-24/+43
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. llvm-svn: 230067
* Don't try to rebuild modules on umbrella header mismatchBen Langmuir2015-02-201-3/+7
| | | | | | | | | | | | | | | There are two issues here: 1) It's too late to rebuild at this point, because we won't go through removeModules and when we try to reload the new .pcm we'll get the old one instead. We might be able to call removeModules after an OutOfDate here, but I'm not yet confident that it is always safe to do so. 2) In practice, this check fails spuriously when the umbrella header appears to change because of a VFS change that means it maps to a different copy of the same file. Because of this, we just skip the check for now. llvm-svn: 230064
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-205-43/+24
| | | | | | | | | This reverts commit r230044 while dealing with buildbot breakage. Conflicts: test/Modules/module_container.m llvm-svn: 230052
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-205-24/+43
| | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 llvm-svn: 230044
* Revert "Mangle the IsSystem bit into the .pcm file name"Ben Langmuir2015-02-192-8/+0
| | | | | | | | While I investigate some possible problems with this patch. This reverts commit r228966 llvm-svn: 229910
* [PCH/Modules] Check that the specific module cache path the PCH was built ↵Argyrios Kyrtzidis2015-02-192-8/+57
| | | | | | | | | | | | with, is the same as the one in the current compiler invocation. If they differ reject the PCH. This protects against the badness occurring from getting modules loaded from different module caches (see crashes). rdar://19889860 llvm-svn: 229909
* Prevent use after free caused by accessing a member into a dense set.Daniel Jasper2015-02-181-1/+2
| | | | | | | | The member gets invalidated as elements are added to the dense set. Directly access the underlying pointer instead. Not sure how to create a test case for this :-(. Maybe Richard can help. llvm-svn: 229673
* Prefer SmallVector::append/insert over push_back loops. Clang edition.Benjamin Kramer2015-02-171-2/+1
| | | | | | Same functionality, but hoists the vector growth out of the loop. llvm-svn: 229508
* Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for ↵Aaron Ballman2015-02-151-2/+2
| | | | | | requiring the macro. NFC; Clang edition. llvm-svn: 229339
* [modules] Guard against recursively re-entering diagnosing ODR violations whileRichard Smith2015-02-131-0/+11
| | | | | | | in the middle of emitting an ODR violation diagnostic. I don't yet have a reduced testcase for this issue, working on it... llvm-svn: 229167
* [modules] Don't produce duplicate lookup results if the same declaration isRichard Smith2015-02-131-5/+12
| | | | | | visible through multiple imported modules. No functionality change. llvm-svn: 229147
* [modules] Improve llvm-bcanalyzer output on AST files a little. No ↵Richard Smith2015-02-132-4/+5
| | | | | | functionality change. llvm-svn: 229145
* [modules] When collecting declarations to complete a redeclaration chain for anRichard Smith2015-02-121-12/+18
| | | | | | | | | | entity, put the originally-canonical decl IDs in the right places in the redecl chain rather than reordering them all to the start. If we don't ensure that the redecl chain order is consistent with the topological module order, we can fail to make a declaration visible if later declarations are in more IDNSs than earlier ones (for instance, because the earlier decls are invisible friends). llvm-svn: 228978
* Mangle the IsSystem bit into the .pcm file nameBen Langmuir2015-02-122-0/+8
| | | | | | | | | When mangling the module map path into a .pcm file name, also mangle the IsSystem bit, which can also depend on the header search paths. For example, the user may change from -I to -isystem. This can affect diagnostics in the importing TU. llvm-svn: 228966
* [modules] Treat friend declarations that are lexically within a dependentRichard Smith2015-02-075-24/+59
| | | | | | | context as anonymous for merging purposes. They can't be found by their names, so we merge them based on their position within the surrounding context. llvm-svn: 228485
* PR22405: don't lose implicit-deleted-ness across AST write / read.Richard Smith2015-02-061-14/+14
| | | | llvm-svn: 228464
* ASTUnit: Use range-based for loops.Benjamin Kramer2015-02-061-1/+2
| | | | llvm-svn: 228420
* Update APIs that return a pair of iterators to return an iterator_range instead.Benjamin Kramer2015-02-061-7/+8
| | | | | | Convert uses of those APIs into ranged for loops. NFC. llvm-svn: 228404
* [modules] If a module declares an entity and then imports another declarationRichard Smith2015-02-062-20/+55
| | | | | | | | | of that entity, ensure that the redeclaration chain is reordered properly on reload. Otherwise, the result of name lookup for that entity may point to an entity that is too old; if that's an injected friend name or the like, that can result in the name not being found at all. llvm-svn: 228371
* [modules] Refactor: unify the code that picks which declaration goes into aRichard Smith2015-02-051-55/+46
| | | | | | name lookup table. llvm-svn: 228354
* [modules] When using -E, we may try to merge decls despite having no SemaRichard Smith2015-02-041-0/+5
| | | | | | | | | | | object. In such a case, use the TU's DC for merging global decls rather than giving up when we find there is no TU scope. Ultimately, we should probably avoid all loading of decls when preprocessing, but there are other reasonable use cases for loading an AST file with no Sema object for which this is the right thing. llvm-svn: 228234
* [modules] If we already have a fake definition for one declaration of a class,Richard Smith2015-02-041-1/+2
| | | | | | | don't think we're providing a new one in an update record adding a definition to another declaration of the same class. llvm-svn: 228104
* [modules] Be sure to load the lexical definition of a class templateRichard Smith2015-02-031-13/+22
| | | | | | | specialization from an update record exactly once, even if we needed to fake up the definition. llvm-svn: 227939
* [modules] When we try to complete the redeclaration chain for a class templateRichard Smith2015-01-311-0/+15
| | | | | | specialization, pull in any lazy specializations of the class template. llvm-svn: 227668
* [modules] Sometimes we can deserialize a class member but not have yetRichard Smith2015-01-242-22/+62
| | | | | | | | | | | encountered any definition for the class; this happens when the definition is added by an update record that is not yet loaded. In such a case, eagerly pick the original parent of the member as the canonical definition of the class rather than muddling through with the canonical declaration (the latter can lead to us failing to merge properly later if the canonical definition turns out to be some other declaration). llvm-svn: 226977
* [modules] If we add an implicit special member to a class through an updateRichard Smith2015-01-221-1/+13
| | | | | | | | record, and that class declaration is not the canonical definition of the class, be sure to add the class to the list of classes that are consulted when we look up a special member in the canonical definition. llvm-svn: 226778
* [modules] If we load two declarations with typedef names for linkage purposesRichard Smith2015-01-221-4/+10
| | | | | | | on top of a local declaration of the same entity, we still need to remember that we loaded the first one or we may fail to merge the second one properly. llvm-svn: 226765
* [modules] It's possible to merge into the pattern of a class template before weRichard Smith2015-01-221-3/+7
| | | | | | | load the definition data from the declaration itself. In that case, merge properly; don't assume the prior definition is the same as our own. llvm-svn: 226761
* Fix bogus 'method is unavailable' errors with modulesBen Langmuir2015-01-121-3/+7
| | | | | | | | This just tweaks the fix from r224892 (which handled PCHs) to work with modules, where we will serialize each method individually and hence the hasMoreThanOneDecl bit needs to be updated as we add the methods. llvm-svn: 225659
* Rename RefersToCapturedVariable to RefersToEnclosingVariableOrCapture, NFCAlexey Bataev2015-01-123-4/+4
| | | | llvm-svn: 225624
* Objective-C: Serialize "more than one decl" state of ObjCMethodList.Nico Weber2014-12-273-14/+34
| | | | | | | | | | | | | | | | | This fixes PR21587, what r221933 fixed for regular programs is now also fixed for decls coming from PCH files. Use another bit from the count/bits uint16_t for storing the "more than one decl" bit. This reduces the number of bits for the count from 14 to 13. The selector with the most overloads in Cocoa.h has ~55 overloads, so 13 bits should still be plenty. Since this changes the meaning of a serialized bit pattern, also increase clang::serialization::VERSION_MAJOR. Storing the "more than one decl" state of only the first overload isn't quite correct, but Sema::AreMultipleMethodsInGlobalPool() currently only looks at the state of the first overload so it's good enough for now. llvm-svn: 224892
* Address review feedback on r221933.Nico Weber2014-12-272-21/+21
| | | | | | | | | | | Remove ObjCMethodList::Count, instead store a "has more than one decl" bit in the low bit of the ObjCMethodDecl pointer, using a PointerIntPair. Most of this patch is replacing ".Method" with ".getMethod()". No intended behavior change. llvm-svn: 224876
* Renamed RefersToEnclosingLocal bitfield to RefersToCapturedVariable.Alexey Bataev2014-12-163-3/+4
| | | | | | | Bitfield RefersToEnclosingLocal of Stmt::DeclRefExprBitfields renamed to RefersToCapturedVariable to reflect latest changes introduced in commit 224323. Also renamed method Expr::refersToEnclosingLocal() to Expr::refersToCapturedVariable() and comments for constant arguments. No functional changes. llvm-svn: 224329
* First patch with codegen of the 'omp for' directive. It implementsAlexander Musman2014-12-152-0/+18
| | | | | | | | | | | | | | | the simplest case, which is used when no chunk_size is specified in the schedule(static) or no 'schedule' clause is specified - the iteration space is divided by the library into chunks that are approximately equal in size, and at most one chunk is distributed to each thread. In this case, we do not need an outer loop in each thread - each thread requests once which iterations range it should handle (using __kmpc_for_static_init runtime call) and then runs the inner loop on this range. Differential Revision: http://reviews.llvm.org/D5865 llvm-svn: 224233
* [modules] When constructing paths relative to a module, strip out /./ directoryRichard Smith2014-12-111-15/+19
| | | | | | | components. These sometimes get synthetically added, and we don't want -Ifoo and -I./foo to be treated fundamentally differently here. llvm-svn: 224055
OpenPOWER on IntegriCloud