summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove llvm:: from uses of ArrayRef.Craig Topper2014-06-282-7/+7
| | | | llvm-svn: 211987
* [OPENMP] Parsing and sema analysis for 'copyprivate' clause.Alexey Bataev2014-06-272-0/+20
| | | | llvm-svn: 211886
* [OPENMP] Initial parsing and sema analysis for 'single' directive.Alexey Bataev2014-06-262-0/+19
| | | | llvm-svn: 211774
* [OPENMP] Initial parsing and sema analysis for 'section' directive.Alexey Bataev2014-06-262-0/+15
| | | | llvm-svn: 211767
* Convert some function arguments to use ArrayRef.Craig Topper2014-06-261-2/+1
| | | | llvm-svn: 211764
* [OPENMP] Initial support for 'sections' directive.Alexey Bataev2014-06-252-0/+19
| | | | llvm-svn: 211685
* DiagnosticIDs: use diagnostic severities to simplify extension handlingAlp Toker2014-06-221-7/+5
| | | | llvm-svn: 211479
* [PCH] Remove the BackingIvarReferencedInAccessor field from DECL_OBJC_IVAR ↵Argyrios Kyrtzidis2014-06-211-2/+0
| | | | | | | | abbreviation record. Patch by Yiding Jia! llvm-svn: 211438
* [OPENMP] Initial support for 'nowait' clause.Alexey Bataev2014-06-202-0/+7
| | | | llvm-svn: 211352
* [OPENMP] Initial support for 'ordered' clause.Alexey Bataev2014-06-202-0/+7
| | | | llvm-svn: 211347
* [OPENMP] Initial support for 'schedule' clause.Alexey Bataev2014-06-202-0/+20
| | | | llvm-svn: 211342
* Avoid invalidating successfully loaded module filesBen Langmuir2014-06-202-24/+24
| | | | | | | | | | | | | | | | | Successfully loaded module files may be referenced in other ModuleManagers, so don't invalidate them. Two related things are fixed: 1) I thought the last module in the manager was always the one that failed, but it isn't. So check explicitly against the list of vetted modules from ReadASTCore. 2) We now keep the file descriptor of pcm file open, which avoids the possibility of having two different pcms for the same module loaded when building in parallel with headers being modified during a build. <rdar://problem/16835846> llvm-svn: 211330
* [OPENMP] Initial support for '#pragma omp for' (fixed incompatibility with ↵Alexey Bataev2014-06-182-0/+23
| | | | | | MSVC). llvm-svn: 211140
* Revert "[OPENMP] Initial support for '#pragma omp for'."Rafael Espindola2014-06-172-23/+0
| | | | | | | | This reverts commit r211096. Looks like it broke the msvc build: SemaOpenMP.cpp(140) : error C4519: default template arguments are only allowed on a class template llvm-svn: 211113
* [OPENMP] Initial support for '#pragma omp for'.Alexey Bataev2014-06-172-0/+23
| | | | llvm-svn: 211096
* [modules] When we merge redecl chains or mark a decl used with an updateRichard Smith2014-06-162-2/+17
| | | | | | | record, mark all subsequent decls as 'used' too, to maintain the AST invariant that getPreviousDecl()->Used implies this->Used. llvm-svn: 211050
* [OPENMP] Initial support of 'reduction' clauseAlexey Bataev2014-06-162-0/+31
| | | | llvm-svn: 211007
* Include system_error directly.Rafael Espindola2014-06-122-2/+2
| | | | llvm-svn: 210802
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-122-2/+2
| | | | llvm-svn: 210780
* Complete the switch from mappings to declarative diagnostic severitiesAlp Toker2014-06-121-1/+1
| | | | | | | | | This begins to address cognitive dissonance caused by treating the Note diagnostic level as a severity in the diagnostic engine. No change in functionality. llvm-svn: 210758
* Improve diagnostic mapping terminologyAlp Toker2014-06-102-4/+4
| | | | | | | | | | | | Diagnostic mappings are used to calculate the final severity of diagnostic instances. Detangle the implementation to reflect the terminology used in documentation and bindings. No change in functionality. llvm-svn: 210518
* [OPENMP] Parsing/Sema for OMPLasprivateClause.Alexander Musman2014-06-042-0/+20
| | | | | | Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks. llvm-svn: 210184
* There is no std::errc:success, remove the llvm one.Rafael Espindola2014-05-311-2/+1
| | | | llvm-svn: 209959
* Invalidate the file system cache entries for files that may rebuildBen Langmuir2014-05-301-5/+21
| | | | | | | | | | | | | | | | | | | | | | This reapplies r209910 with a fix for the assertion failures hit on the buildbots. original commit message: I thought we could get away without this, but it means that the FileEntry objects actually refer to the wrong files, since pcms are not updated inplace, they are atomically renamed into place after compiling a module. So we are close to the original behaviour of invalidating the cache for all modules being removed, but now we should only invalidate the ones that depend on whichever module failed to load. Unfortunately I haven't come up with a new test that didn't require a race between parallel invocations of clang. <rdar://problem/17038180> llvm-svn: 209922
* Revert "Invalidate the file system cache entries for files that may rebuild"Ben Langmuir2014-05-301-18/+5
| | | | | | This reverts commit r209910, which is breaking some of the bots. llvm-svn: 209911
* Invalidate the file system cache entries for files that may rebuildBen Langmuir2014-05-301-5/+18
| | | | | | | | | | | | | | | | | | I thought we could get away without this, but it means that the FileEntry objects actually refer to the wrong files, since pcms are not updated inplace, they are atomically renamed into place after compiling a module. So we are close to the original behaviour of invalidating the cache for all modules being removed, but now we should only invalidate the ones that depend on whichever module failed to load. Unfortunately I haven't come up with a new test that didn't require a race between parallel invocations of clang. <rdar://problem/17038180> llvm-svn: 209910
* Parsing/Sema for OMPAlignedClause.Alexander Musman2014-05-292-0/+24
| | | | llvm-svn: 209816
* When merging functions across modules (and in particular, instantiations ofRichard Smith2014-05-291-2/+37
| | | | | | | member functions), ensure that the redecl chain never transitions from 'inline' to 'not inline', since that violates an AST invariant. llvm-svn: 209794
* Parsing/Sema for OMPCollapseClause.Alexander Musman2014-05-272-0/+13
| | | | | | Actual usage in Sema for collapsing loops will in some future patch. llvm-svn: 209660
* Recompute the injected class name type for a class template specializationRichard Smith2014-05-232-5/+1
| | | | | | rather than saving and restoring it. llvm-svn: 209557
* Implemented support for "pragma clang optimize on/off", based on attribute ↵Dario Domizioli2014-05-232-0/+24
| | | | | | | | | | | | | | | | 'optnone'. This patch implements support for selectively disabling optimizations on a range of function definitions through a pragma. The implementation is that all function definitions in the range are decorated with attribute 'optnone'. #pragma clang optimize off // All function definitions in here are decorated with 'optnone'. #pragma clang optimize on // Compilation resumes as normal. llvm-svn: 209510
* Avoid allocating extra memory to handle the lazy definition data pointer forRichard Smith2014-05-221-2/+2
| | | | | | CXXRecordDecls when modules is enabled. llvm-svn: 209482
* If a class template specialization from one module has its definitionRichard Smith2014-05-222-0/+23
| | | | | | | | | instantiated in another module, and the instantiation uses a partial specialization, include the partial specialization and its template arguments in the update record. We'll need them if someone imports the second module and tries to instantiate a member of the template. llvm-svn: 209472
* Frontend: Propagate ASTReaderListener API in ChainedASTReaderListenerJustin Bogner2014-05-221-2/+8
| | | | | | | | | | | | | | | | | ASTReaderListener's documentation states that visitInputFile will be called based on the return values of needsInputFileVisitation and needsSystemInputFileVisitation, but ChainedASTReaderListener may call these methods on a child listener based on the values returned by the other child. Even worse, the calls to visitInputFile may be short-circuited due to the use of the boolean or, so the calls to visit may not occur at all for the second listener. This updates ChainedASTReaderListener::visitInputFile to propagate the ASTReaderListener behaviour to both children. llvm-svn: 209394
* [C++11] Use 'nullptr'. Serialization edition.Craig Topper2014-05-2212-173/+179
| | | | llvm-svn: 209392
* Speculative fix for Windows buildbot after r209138Ben Langmuir2014-05-201-0/+5
| | | | | | | | | It appears that Windows doesn't like renaming over open files, which we do in clearOutputFiles. The file being compiled should be safe to removed, but this isn't very satisfying - we don't want to manually manage the lifetime of files we cannot prove have no references. llvm-svn: 209195
* If two sibling modules declare the same entity, and we indirectly pull aRichard Smith2014-05-192-1/+41
| | | | | | | | declaration of that entity in from one of those modules, keep track of the fact that we've not completed the redeclaration chain yet so that we can pull the remaining declarations in from the other module if they're needed. llvm-svn: 209161
* Don't refresh stat() info for pcm filesBen Langmuir2014-05-191-13/+1
| | | | | | | | Follow-up fix for 209138. Actually, since we already have this file open, we don't want to refresh the stat() info, since that might be newer than what we have open (bad!). llvm-svn: 209143
* Fix use-after-free and spurious error during module loadBen Langmuir2014-05-191-2/+13
| | | | | | | | | | | | | | FileManager::invalidateCache is not safe to call when there may be existing references to the file. What module load failure needs is to refresh so stale stat() info isn't stored. This may be the last user of invalidateCache; I'll take a look and remove it if possible in a future commit. This caused a use-after-free error as well as a spurious error message that a module was "found in both 'X.pcm' and 'X.pcm'" in some cases. llvm-svn: 209138
* If a declaration is loaded, and then a module import adds a redeclaration, thenRichard Smith2014-05-163-34/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ensure that querying the first declaration for its most recent declaration checks for redeclarations from the imported module. This works as follows: * The 'most recent' pointer on a canonical declaration grows a pointer to the external AST source and a generation number (space- and time-optimized for the case where there is no external source). * Each time the 'most recent' pointer is queried, if it has an external source, we check whether it's up to date, and update it if not. * The ancillary data stored on the canonical declaration is allocated lazily to avoid filling it in for declarations that end up being non-canonical. We'll still perform a redundant (ASTContext) allocation if someone asks for the most recent declaration from a decl before setPreviousDecl is called, but such cases are probably all bugs, and are now easy to find. Some finessing is still in order here -- in particular, we use a very general mechanism for handling the DefinitionData pointer on CXXRecordData, and a more targeted approach would be more compact. Also, the MayHaveOutOfDateDef mechanism should now be expunged, since it was addressing only a corner of the full problem space here. That's not covered by this patch. Early performance benchmarks show that this makes no measurable difference to Clang performance without modules enabled (and fixes a major correctness issue with modules enabled). I'll revert if a full performance comparison shows any problems. llvm-svn: 209046
* Merge a couple of copy-and-pasted functionsAlp Toker2014-05-161-53/+28
| | | | | | No change in functionality. llvm-svn: 209005
* Rename SourceManager::createFileIDForMemBuffer()Alp Toker2014-05-161-2/+2
| | | | | | | | It makes more sense to just overload createFileID(). Gardening only. llvm-svn: 209002
* No longer triggering a checked iterator assert on Windows when using ↵Aaron Ballman2014-05-131-1/+1
| | | | | | std::copy while deserializing attributed statements with more than one attribute. llvm-svn: 208702
* Refactor to avoid explicitly listing all the different flavours of redeclarableRichard Smith2014-05-131-56/+43
| | | | | | declarations, and duplicating code between them. llvm-svn: 208662
* Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.Benjamin Kramer2014-05-103-2/+4
| | | | | | | Required pulling LambdaExpr::Capture into its own header. No functionality change. llvm-svn: 208470
* Let ASTReader optionally delete its ASTDeserializationListener.Nico Weber2014-05-081-30/+30
| | | | | | | | | | | | | | | | | | | | Use this to fix the leak of DeserializedDeclsDumper and DeserializedDeclsChecker in FrontendAction (found by LSan), PR19560. The "delete this" bool is necessary because both PCHGenerator and ASTUnit return the same object from both getDeserializationListener() and getASTMutationListener(), so ASTReader can't just have a unique_ptr. It's also not possible to just let FrontendAction (or CompilerInstance) own these listeners due to lifetime issues (see comments on PR19560). Finally, ASTDeserializationListener can't easily be refcounted, since several of the current listeners are allocated on the stack. Having this bool isn't ideal, but it's a pattern that's used in other places in the codebase too, and it seems better than leaking. llvm-svn: 208277
* Fix latent bug. This can't actually manifest at the moment, but is a time-bombRichard Smith2014-05-081-1/+1
| | | | | | for the next time someone adds something to this function. llvm-svn: 208270
* [OPENMP] Initial codegen for '#pragma omp parallel'Alexey Bataev2014-05-062-4/+12
| | | | llvm-svn: 208077
* [OPENMP] 'proc_bind' clause support - Parsing and sema analysis for OpenMP ↵Alexey Bataev2014-05-062-0/+16
| | | | | | clause 'proc_bind' llvm-svn: 208060
* Fix a use-after-free bug I recently introduced in lookupModuleFileBen Langmuir2014-05-041-4/+3
| | | | llvm-svn: 207932
OpenPOWER on IntegriCloud