summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs
Commit message (Collapse)AuthorAgeFilesLines
...
* [modules] When instantiating the contents of an imported CXXRecordDecl, we canRichard Smith2015-08-112-0/+5
| | | | | | | | emit lexical contents for a declaration for another module. Track which module those contents came from, and ensure that we only grab the lexical contents from a single such instantiation. llvm-svn: 244682
* Add file missed from r244409.Richard Smith2015-08-091-0/+9
| | | | llvm-svn: 244410
* [modules] When loading a template specialization, re-canonicalize its templateRichard Smith2015-08-093-0/+18
| | | | | | | | arguments because the reloaded form might have become non-canonical across the serialization/deserialization step (this particularly happens when the canonical form of the type involves an expression). llvm-svn: 244409
* Make 'arm' cover both 32 and 64 bit architecutresBen Langmuir2015-08-071-0/+13
| | | | | | | | | | | | | | | | ... and add aarch32 to specifically refer to the 32-bit ones. Previously, 'arm' meant only 32-bit architectures and there was no way for a module to build with both 32 and 64 bit ARM architectures. Now a module that is intended to work on both architectures can specify requires arm whereas a module only for 32-bit platforms can say requires aarch32 and just like before, 64-bit only can say requires aarch64 llvm-svn: 244306
* [modules] Make IndirectFieldDecl mergeable to avoid lookup ambiguity when ↵Richard Smith2015-08-041-0/+8
| | | | | | the same anonymous union is defined across multiple modules. llvm-svn: 243940
* [modules] Fix issue where building a module from a relative path when ↵Argyrios Kyrtzidis2015-07-312-0/+7
| | | | | | | | | -working-directory option is set, results in error. The error was "module '<name>' was built in directory '<path>' but now resides in directory '<path>' rdar://21330027 llvm-svn: 243718
* Avoid failure to canonicalize '..'.Sean Silva2015-07-302-0/+5
| | | | | | | | | | | | | | Also fix completely broken and untested code which was hiding the primary bug. The !LLVM_ON_UNIX branch of the ifdef was actually a no-op. I ran into this in the wild. It was causing failures in our SDK build. Ideally we'd have a perfect llvm::sys::fs::canonical, but at least this is a step in the right direction, and fixes an obviously broken case. In some sense the test case I've added here is an integration test. We should have these routines thoroughly unit tested in llvm::sys::fs. llvm-svn: 243597
* [modules] When performing redeclaration lookup for a using declaration, preferRichard Smith2015-07-295-0/+16
| | | | | | | | | | UsingShadowDecls over other declarations of the same entity in the lookup results. This ensures that we build correct redeclaration chains for the UsingShadowDecls (otherwise we could see assertions and other misbehavior in modules builds, when merging combines multiple redeclaration chains for the same entity from the same module into one chain). llvm-svn: 243592
* [modules] Add (already passing) test for template default argument merging ↵Richard Smith2015-07-192-0/+4
| | | | | | when the template is declared in a namespace. llvm-svn: 242653
* Add file missed from r242105.Richard Smith2015-07-141-0/+3
| | | | llvm-svn: 242109
* [modules] When diagnosing errors in module map files found by 'extern ↵Richard Smith2015-07-141-0/+2
| | | | | | module' declarations, show how we got to that module map file. llvm-svn: 242105
* [Modules] Allow missing header before a missing requirementBen Langmuir2015-07-131-0/+11
| | | | | | | | | | | And make the module unavailable without breaking any parent modules. If there's a missing requirement after we've already seen a missing header, still update the IsMissingRequiement bit correctly. Also, diagnose missing requirements before missing headers, since the existence of the header is moot if there are missing requirements. llvm-svn: 242055
* [modules] When checking the include guard for a header, check whether it'sRichard Smith2015-07-105-0/+10
| | | | | | | | | | visible in the module we're considering entering. Previously we assumed that if we knew the include guard for a modular header, we'd already parsed it, but that need not be the case if a header is present in the current module and one of its dependencies; the result of getting this wrong was that the current module's submodule for the header would end up empty. llvm-svn: 241953
* [modules] Fix "prefer own module over others" rule when selecting a module ↵Richard Smith2015-07-101-2/+2
| | | | | | for a header to work in the presence of module hierarchy. llvm-svn: 241936
* [modules] Fix merging support for forward-declared enums with fixed ↵Richard Smith2015-07-081-0/+3
| | | | | | underlying types. A visible declaration is enough to make the type complete, but not enough to make the definition visible. llvm-svn: 241743
* [modules] Fix crash when writing an update record for a redeclaration of an ↵Richard Smith2015-07-083-0/+6
| | | | | | empty namespace. llvm-svn: 241732
* [modules] When determining the visible module set during templateRichard Smith2015-07-083-0/+18
| | | | | | | instantiation, use the set of modules visible from the template definition, not from whichever declaration the specialization was instantiated from. llvm-svn: 241662
* [Modules] Be consistent about finding a module for framework headersBen Langmuir2015-07-027-0/+22
| | | | | | | | | | | | | | | | We use findModuleForHeader() in several places, but in header search we were not calling it when a framework module didn't show up with the expected name, which would then lead to unexpected non-modular includes. Now we will find the module unconditionally for frameworks. For regular frameworks, we use the spelling of the module name from the module map file, and for inferred ones we use the canonical directory name. In the future we might want to lock down framework modules sufficiently that these name mismatches cannot happen. rdar://problem/20465870 llvm-svn: 241258
* [modules] Merging support for specializations of a function template. This veryRichard Smith2015-07-011-0/+8
| | | | | | | rarely matters, but can affect whether two dependent types are canonically equivalent. llvm-svn: 241207
* [modules] Don't make out-of-line member specializations of an instantiatedRichard Smith2015-07-011-1/+3
| | | | | | | class template specialization visible just because the class template specialization's definition is visible. llvm-svn: 241182
* [modules] Skip trailing attributes when skipping a class definition during ↵Richard Smith2015-07-011-0/+4
| | | | | | parse-merging. llvm-svn: 241180
* [modules] Don't require the 'inline' specifier when merging an inline function;Richard Smith2015-07-011-0/+6
| | | | | | any source of the inline nature is sufficient. llvm-svn: 241146
* [modules] Before checking whether the controlling macro of a header is defined,Richard Smith2015-07-015-0/+13
| | | | | | | | | | | update the identifier in case we've imported a definition of the macro (and thus the contents of the header) from a module. Also fold ExternalIdentifierLookup into ExternalPreprocessorSource; it no longer makes sense to keep these separate now that the only user of the former also needs the latter. llvm-svn: 241137
* [modules] Make sure macros get made visible in the top-level file if we've gotRichard Smith2015-06-302-0/+12
| | | | | | | local submodule visibility enabled; that top-level file might not actually be the module includes buffer if use of prebuilt modules is disabled. llvm-svn: 241120
* Debug Info: Emit debug info for @import declarations.Adrian Prantl2015-06-302-0/+6
| | | | | | | | | This allows a module-aware debugger such as LLDB to import the currently visible modules before dropping into the expression evaluator. rdar://problem/20965932 llvm-svn: 241084
* [Modules] Test lock file removed on signalBen Langmuir2015-06-292-0/+4
| | | | | | | | For r240967. rdar://problem/21512307 llvm-svn: 240968
* [modules] Properly merge visibility of class definitions that got merged whileRichard Smith2015-06-254-2/+8
| | | | | | parsing then merged again when the module was loaded. llvm-svn: 240700
* [modules] When building a module, if there are multiple matches for a headerRichard Smith2015-06-224-0/+6
| | | | | | | file in the loaded module maps and one of them is from the current module, that's the right match. llvm-svn: 240350
* [modules] When determining whether a definition of a class is visible, check ↵Richard Smith2015-06-205-0/+12
| | | | | | all modules even if we've already found a definition that's not visible. llvm-svn: 240204
* [modules] Fix typo in default argument merging.Richard Smith2015-06-172-0/+3
| | | | llvm-svn: 239954
* [modules] Fix merging of default template arguments onto friend templates.Richard Smith2015-06-161-0/+11
| | | | | | | | | Previously we'd complain about redefinition of default arguments when we instantiated a class with a friend template that inherits its default argument, because we propagate the default template arguemnt onto the friend when we reload the AST. llvm-svn: 239857
* Fix submodule test to pass on content addressable filesystems where inodes ↵Reid Kleckner2015-06-152-0/+2
| | | | | | would collide llvm-svn: 239765
* [modules] Better support for redefinitions of an entity from the same module.Richard Smith2015-06-153-1/+3
| | | | | | | Support this across module save/reload and extend the 'missing import' diagnostics with a list of providing modules. llvm-svn: 239750
* [modules] Apply name visibility rules to names found by ADL.Richard Smith2015-06-121-0/+6
| | | | llvm-svn: 239578
* [modules] Fix crash with multiple levels of default template argument merging.Richard Smith2015-06-111-0/+1
| | | | llvm-svn: 239575
* [modules] Fix assert/crash when parsing and merging a definition of a class ↵Richard Smith2015-06-111-3/+3
| | | | | | with a base-specifier inside a namespace. llvm-svn: 239569
* [modules] Fix a few places where merging wasn't performed if modules was ↵Richard Smith2015-06-113-0/+14
| | | | | | disabled but local module visibilty was enabled. llvm-svn: 239504
* [modules] Don't allow use of non-visible (inherited) default template arguments.Richard Smith2015-06-101-0/+2
| | | | llvm-svn: 239487
* [modules] Track all default template arguments for a given parameter acrossRichard Smith2015-06-103-1/+7
| | | | | | | modules, and allow use of a default template argument if any of the parameters providing it is visible. llvm-svn: 239485
* Revert accidentally-committed test change from r239447.Richard Smith2015-06-102-6/+1
| | | | llvm-svn: 239452
* Refactor storage of default template arguments.Richard Smith2015-06-102-1/+6
| | | | | | | This is just a preparatory step towards fixing visibility for default template arguments in modules builds. llvm-svn: 239447
* [modules] Fix some visibility issues with default template arguments.Richard Smith2015-06-093-0/+5
| | | | | | | | | | | | | | | | | | | There are still problems here, but this is a better starting point. The main part of the change is: when doing a lookup that would accept visible or hidden declarations, prefer to produce the latest visible declaration if there are any visible declarations, rather than always producing the latest declaration. Thus, when we inherit default arguments (and other properties) from a previous declaration, we inherit them from the previous visible declaration; if the previous declaration is hidden, we already suppress inheritance of default arguments. There are a couple of other changes here that fix latent bugs exposed by this change. llvm-svn: 239371
* [modules] If we re-enter a submodule from within itself (when submoduleRichard Smith2015-05-213-0/+21
| | | | | | | | | | visibility is enabled) or leave and re-enter it, restore the macro and module visibility state from last time we were in that submodule. This allows mutually-#including header files to stand a chance at being modularized with local visibility enabled. llvm-svn: 237871
* [modules] Support merging a parsed default argument with an imported hidden ↵Richard Smith2015-05-201-1/+2
| | | | | | one for non-type and template template parameters too. llvm-svn: 237815
* [modules] Support merging a parsed default function/template argument with ↵Richard Smith2015-05-201-0/+2
| | | | | | an imported but hidden one. llvm-svn: 237814
* [modules] Support for merging a parsed definition of a static data member of ↵Richard Smith2015-05-191-0/+2
| | | | | | a class template into an imported but hidden definition. llvm-svn: 237647
* [modules] Support for merging a parsed class template specialization ↵Richard Smith2015-05-181-0/+5
| | | | | | definition into an imported but hidden definition. llvm-svn: 237612
* [modules] Add local submodule visibility support for declarations.Richard Smith2015-05-153-0/+3
| | | | | | | | | | | | With this change, enabling -fmodules-local-submodule-visibility results in name visibility rules being applied to submodules of the current module in addition to imported modules (that is, names no longer "leak" between submodules of the same top-level module). This also makes it much safer to textually include a non-modular library into a module: each submodule that textually includes that library will get its own "copy" of that library, and so the library becomes visible no matter which including submodule you import. llvm-svn: 237473
* [modules] Suport for merging a parsed enum definition into an existing ↵Richard Smith2015-05-071-0/+7
| | | | | | imported but not visible definition. llvm-svn: 236690
* [modules] If a module #includes a modular header that #undef's its macro, itRichard Smith2015-05-023-0/+7
| | | | | | | | should not export the macro. ... at least, not unless we have local submodule visibility enabled. llvm-svn: 236369
OpenPOWER on IntegriCloud