summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
Commit message (Collapse)AuthorAgeFilesLines
...
* [OPENMP] Clause 'num_threads'Alexey Bataev2014-03-062-0/+13
| | | | llvm-svn: 203087
* Fix crash if a submodule overrides one of its own macros, and add support forRichard Smith2014-03-062-3/+14
| | | | | | | | submodule macro overriding within the same top-level module (necessary for the testcase to be remotely reasonable). Incidentally reduces the number of libc++ testsuite regressions with modules enabled from 7 to 6. llvm-svn: 203063
* Switch to an idiomatic C++ erase/remove for this loop, and fix a bug in theRichard Smith2014-03-061-3/+5
| | | | | | | process (I don't believe it's possible to write a testcase for the bug with a non-checking STL implementation). llvm-svn: 203042
* [C++11] Remove a now unnecessary use of std::function for a remove_ifChandler Carruth2014-03-031-4/+3
| | | | | | | | predicate. The wrapper used by SetVector was erroneously requiring an adaptable predicate. It has been fixed and we really don't want to require an indirect call for every predicate evaluation. llvm-svn: 202744
* Introduce '-fmodules-user-build-path' which accepts the "canonical" path to ↵Argyrios Kyrtzidis2014-03-032-0/+2
| | | | | | | | | | a user workspace build. This is used to avoid conflicts with user modules with the same name from different workspaces. rdar://16042513 llvm-svn: 202683
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-023-6/+6
| | | | llvm-svn: 202639
* [C++11] Replace verbose functors with succinct lambdasBenjamin Kramer2014-03-011-17/+3
| | | | | | No functionality change. llvm-svn: 202590
* If a module A exports a macro M, and a module B imports that macro and #undef'sRichard Smith2014-03-013-135/+338
| | | | | | | | | | | | | | it, importers of B should not see the macro. This is complicated by the fact that A's macro could also be visible through a different path. The rules (as hashed out on cfe-commits) are included as a documentation update in this change. With this, the number of regressions in libc++'s testsuite when modules are enabled drops from 47 to 7. Those remaining 7 are also macro-related, and are due to remaining bugs in this change (in particular, the handling of submodules is imperfect). llvm-svn: 202560
* [OPENMP] First changes for Parsing and Sema for 'omp simd' directive supportAlexey Bataev2014-02-272-7/+32
| | | | llvm-svn: 202360
* [CMake] Use LINK_LIBS instead of target_link_libraries().NAKAMURA Takumi2014-02-261-2/+1
| | | | llvm-svn: 202238
* Update for llvm api change.Rafael Espindola2014-02-241-1/+1
| | | | llvm-svn: 202053
* Don't assume that F_None is the default. It is about to change.Rafael Espindola2014-02-241-1/+2
| | | | llvm-svn: 202040
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-211-15/+0
| | | | | | | | | | | | | | | | | | | introduce CLANG_TABLEGEN_TARGETS. This does; - clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list. - List of targets is added to LLVM_COMMON_DEPENDS. - all clang libraries and targets depend on generated headers. You might wonder this would be regression, but in fact, this is little loss. - Almost all of clang libraries depend on tblgen'd files and clang-tblgen. - clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild. - Each library's dependencies to tblgen'd files might vary along headers' structure. It made hard to track and update *really optimal* dependencies. Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS. llvm-svn: 201842
* Recommit virtual file systemBen Langmuir2014-02-201-1/+1
| | | | | | | | | | | Previously reverted in r201755 due to causing an assertion failure. I've removed the offending assertion, and taught the CompilerInstance to create a default virtual file system inside createFileManager. In the future, we should be able to reach into the CompilerInvocation to customize this behaviour without breaking clients that don't care. llvm-svn: 201818
* Reverting the virtual file system implementation, because it triggers an ↵Juergen Ributzka2014-02-201-1/+1
| | | | | | | | | | assertion in our internal build bots. This reverts commits 201618, 201635, 201636, 201639, 201685, 201691, and 201696. llvm-svn: 201755
* Use llvm::DeleteContainerSeconds when possibleReid Kleckner2014-02-191-3/+1
| | | | llvm-svn: 201739
* Initial implementation of virtual file systemBen Langmuir2014-02-191-1/+1
| | | | | | | | | | | | This adds the minimum virtual file system support to start migrating FileManager onto the VFS. Originally discussed here: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-February/035188.html Differential Revision: http://llvm-reviews.chandlerc.com/D2745 llvm-svn: 201618
* [OPENMP] 'if' clause support (no CodeGen support)Alexey Bataev2014-02-132-0/+13
| | | | llvm-svn: 201297
* Add an option to allow Clang verify source files for a module only once duringDmitri Gribenko2014-02-122-5/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the build When Clang loads the module, it verifies the user source files that the module was built from. If any file was changed, the module is rebuilt. There are two problems with this: 1. correctness: we don't verify system files (there are too many of them, and stat'ing all of them would take a lot of time); 2. performance: the same module file is verified again and again during a single build. This change allows the build system to optimize source file verification. The idea is based on the fact that while the project is being built, the source files don't change. This allows us to verify the module only once during a single build session. The build system passes a flag, -fbuild-session-timestamp=, to inform Clang of the time when the build started. The build system also requests to enable this feature by passing -fmodules-validate-once-per-build-session. If these flags are not passed, the behavior is not changed. When Clang verifies the module the first time, it writes out a timestamp file. Then, when Clang loads the module the second time, it finds a timestamp file, so it can compare the verification timestamp of the module with the time when the build started. If the verification timestamp is too old, the module is verified again, and the timestamp file is updated. llvm-svn: 201224
* Rename some PCH-related errors to have 'err_' as their prefixDmitri Gribenko2014-02-111-4/+4
| | | | llvm-svn: 201157
* Fix PCH deserialization bug with local static symbols being treated as local ↵Ted Kremenek2014-02-111-1/+1
| | | | | | | | | | | | | extern. This triggered a miscompilation of code using Boost's function_template.hpp when it was included inside a PCH file. A local static within that header would be treated as local extern, resulting in the wrong mangling. This only occurred during PCH deserialization. Fixes <rdar://problem/15975816> and <rdar://problem/15926311>. llvm-svn: 201130
* Stat system dependencies when using -verify-pchBen Langmuir2014-02-071-2/+8
| | | | | | | | We don't stat the system headers to check for stalenes during regular PCH loading for performance reasons. When explicitly saying -verify-pch, we want to check all the dependencies - user or system. llvm-svn: 200979
* Add a CC1 option -verify-pchBen Langmuir2014-02-051-7/+10
| | | | | | | | | This option will: - load the given pch file - verify it is not out of date by stat'ing dependencies, and - return 0 on success and non-zero on error llvm-svn: 200884
* Fix autolinking when modules are imported in pch filesBen Langmuir2014-01-314-16/+17
| | | | | | | | | | | | Add the ImportDecl to the set of interesting delcarations that are deserialized eagerly when an AST file is loaded (rather than lazily like most decls). This is required to get auto linking to work when there is no explicit import in the main file. Also resolve a FIXME to rename 'ExternalDefinitions', since that is only one of the things that need eager deserialization. The new name is 'EagerlyDeserializedDecls'. The corresponding AST bitcode is also renamed. llvm-svn: 200505
* Remove dead code; MacroDirective's IsHidden flag is always false.Richard Smith2014-01-271-5/+0
| | | | llvm-svn: 200265
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-253-5/+5
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* Update FunctionTypeLoc and related names to match r199686Alp Toker2014-01-212-4/+4
| | | | llvm-svn: 199699
* Rename FunctionProtoType accessors from 'arguments' to 'parameters'Alp Toker2014-01-201-3/+3
| | | | | | | | | | | | | | | | | Fix a perennial source of confusion in the clang type system: Declarations and function prototypes have parameters to which arguments are supplied, so calling these 'arguments' was a stretch even in C mode, let alone C++ where default arguments, templates and overloading make the distinction important to get right. Readability win across the board, especially in the casting, ADL and overloading implementations which make a lot more sense at a glance now. Will keep an eye on the builders and update dependent projects shortly. No functional change. llvm-svn: 199686
* [CMake] Apply ADDITIONAL_HEADERS introduced in r199639.NAKAMURA Takumi2014-01-201-2/+4
| | | | llvm-svn: 199640
* Improve the error message when a PCH dependency is modifiedBen Langmuir2014-01-171-4/+19
| | | | | | | | | | Show the top-level pch file as the culprit, rather than the immediate dependency when a pch file imports a pcm from a module. To clarify the relationship, the pch import stack is printed as notes. The old behaviour was misleading when a pch imported a pcm (from a module), since removing the pcm would not fix the problem, whereas rebuilding the pch would. llvm-svn: 199446
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-142-3/+0
| | | | | | | | | | | | | | | This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 llvm-svn: 199250
* Use the simpler version of llvm::sys::fs::remove when possible.Rafael Espindola2014-01-101-3/+2
| | | | llvm-svn: 198957
* [Serialization] In ASTReader::getInputFile record it when we didn't find the ↵Argyrios Kyrtzidis2014-01-081-0/+5
| | | | | | | | file to avoid looking it up again. Hopefully addresses rdar://14514222. llvm-svn: 198781
* [objc] Refactor and improve functionality for the -Wunused-property-ivar ↵Argyrios Kyrtzidis2014-01-032-5/+0
| | | | | | | | | | | | | | warning. - Remove the additions to ObjCMethodDecl & ObjCIVarDecl that were getting de/serialized and consolidate all functionality for the checking for this warning in Sema::DiagnoseUnusedBackingIvarInAccessor - Don't check immediately after the method body is finished, check when the @implementation is finished. This is so we can see if the ivar was referenced by any other method, even if the method was defined after the accessor. - Don't silence the warning if any method is called from the accessor silence it if the accessor delegates to another method via self. rdar://15727325 llvm-svn: 198432
* ObjectiveC. Remove false positive warning for missing propertyFariborz Jahanian2014-01-022-0/+2
| | | | | | | backing ivar by not issuing this warning if ivar is referenced somewhere and accessor makes method calls. // rdar://15727325 llvm-svn: 198367
* Eliminate UnaryTypeTraitExprAlp Toker2014-01-013-24/+0
| | | | | | | | | | | | | Remove UnaryTypeTraitExpr and switch all remaining type trait related handling over to TypeTraitExpr. The UTT/BTT/TT enum prefix and evaluation code is retained pending further cleanup. This is part of the ongoing work to unify type traits following the removal of BinaryTypeTraitExpr in r197273. llvm-svn: 198271
* Serialize source range info for TypeTraitExpr.Jordan Rose2013-12-202-1/+5
| | | | | | | | | This caused some crazy crashes involving std::unordered_map being deserialized from a PCH file and then template instantiation requiring an explicit instantiation location; unfortunately I don't really know how to come up with a minimal test case. llvm-svn: 197764
* PCH: fix a crash caused by a circular deserialization dependencyDmitri Gribenko2013-12-191-4/+7
| | | | | | | | | We started by trying to deserialize decltype(func-param) in a trailing return type, which causes the function parameter decl to be deserialized, which pulls in the function decl, which pulls the function type, which pulls the same decltype() in the return type, and then we crashed. llvm-svn: 197644
* Eliminate BinaryTypeTraitExprAlp Toker2013-12-133-26/+0
| | | | | | | | | | | | | | | | | There's nothing special about type traits accepting two arguments. This commit eliminates BinaryTypeTraitExpr and switches all related handling over to TypeTraitExpr. Also fixes a CodeGen failure with variadic type traits appearing in a non-constant expression. The BTT/TT prefix and evaluation code is retained as-is for now but will soon be further cleaned up. This is part of the ongoing work to unify type traits. llvm-svn: 197273
* Implement DR1460: fix handling of default initializers in unions; don't allowRichard Smith2013-12-102-0/+2
| | | | | | | | | more than one such initializer in a union, make mem-initializers override default initializers for other union members, handle anonymous unions with anonymous struct members better. Fix a couple of semi-related bugs exposed by the tests for same. llvm-svn: 196892
* [CMake] clang/lib: Satisfy dependencies to add *actually used* libraries on ↵NAKAMURA Takumi2013-12-091-1/+8
| | | | | | | | target_link_libraries() and LLVM_LINK_COMPONENTS. I will prune redundant dependencies later. llvm-svn: 196800
* Fix code typos spotted while working on type traitsAlp Toker2013-12-062-6/+6
| | | | llvm-svn: 196587
* Add an AdjustedType sugar node for adjusting calling conventionsReid Kleckner2013-12-052-0/+22
| | | | | | | | | | | | | | | | Summary: In general, this type node can be used to represent any type adjustment that occurs implicitly without losing type sugar. The immediate use of this is to adjust the calling conventions of member function pointer types without breaking template instantiation. Fixes PR17996. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2332 llvm-svn: 196451
* [objc] Introduce ObjCInterfaceDecl::getDesignatedInitializers() to get theArgyrios Kyrtzidis2013-12-032-0/+2
| | | | | | | | | | designated initializers of an interface. If the interface declaration does not have methods marked as designated initializers then the interface inherits the designated initializers of its super class. llvm-svn: 196315
* Remove a whole lot of unused variablesAlp Toker2013-11-271-1/+0
| | | | | | | There are about 30 removed in this patch, generated by a new FixIt I haven't got round to submitting yet. llvm-svn: 195814
* Include non-explicit submodules in exported module listDmitri Gribenko2013-11-041-10/+1
| | | | | | | | | | | | | | | | This change fixes Richard's testcase for r193815. Now we include non-explicit submodules into the list of exports. The test failed previously because: - recursive_visibility_a1.inner is not imported (only recursive_visibility_a1 is), - thus the 'inner' submodule is not showing up in any of the import lists, - and because of this getExportedModules() is not returning the correct module set -- it only considers modules that are imported. The fix is to make Module::getExportedModules() include non-explicit submodules into the list of exports. llvm-svn: 194018
* Implement final resolution of DR1402: implicitly-declared move operators thatRichard Smith2013-11-042-4/+0
| | | | | | | | | | | would be deleted are still declared, but are ignored by overload resolution. Also, don't delete such members if a subobject has no corresponding move operation and a non-trivial copy. This causes us to implicitly declare move operations in more cases, but risks move-assigning virtual bases multiple times in some circumstances (a warning for that is to follow). llvm-svn: 193969
* Allow a new syntax in a module requires-declaration:Richard Smith2013-10-282-5/+6
| | | | | | | | | | | | requires ! feature The purpose of this is to allow (for instance) the module map for /usr/include to exclude <tgmath.h> and <complex.h> when building in C++ (these headers are instead provided by the C++ standard library in this case, and the glibc C <tgmath.h> header would otherwise try to include <complex.h>, resulting in a module cycle). llvm-svn: 193549
* ObjectiveC: under -Wunused-property-ivar warn if property'sFariborz Jahanian2013-10-252-0/+5
| | | | | | | backing warning is not used in one of its accessor methods. // rdar://14989999 llvm-svn: 193439
* I am about to change llvm::MemoryBuffer::getFile take take a Twine. ChangeRafael Espindola2013-10-251-1/+2
| | | | | | clang first so that the build still works. llvm-svn: 193428
OpenPOWER on IntegriCloud