summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
Commit message (Collapse)AuthorAgeFilesLines
...
* [modules] When collecting declarations to complete a redeclaration chain for anRichard Smith2015-02-125-4/+19
| | | | | | | | | | 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-121-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] When determining whether a name from a module replaces a name weRichard Smith2015-02-104-0/+9
| | | | | | | | | already have, check whether the name from the module is actually newer than the existing declaration. If it isn't, we might (say) replace a visible declaration with an injected friend, and thus make it invisible (or lose a default argument or an array bound). llvm-svn: 228661
* [modules] Treat friend declarations that are lexically within a dependentRichard Smith2015-02-076-0/+20
| | | | | | | 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
* [modules] Don't accidentally trigger deserialization from ↵Richard Smith2015-02-074-0/+15
| | | | | | DeclContext::noload_lookup. llvm-svn: 228475
* [modules] If a module declares an entity and then imports another declarationRichard Smith2015-02-065-6/+10
| | | | | | | | | 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] When using -E, we may try to merge decls despite having no SemaRichard Smith2015-02-044-3/+15
| | | | | | | | | | | 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
* Add missing file from r228104.Richard Smith2015-02-041-0/+2
| | | | llvm-svn: 228105
* [modules] If we already have a fake definition for one declaration of a class,Richard Smith2015-02-048-12/+44
| | | | | | | 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-035-1/+37
| | | | | | | specialization from an update record exactly once, even if we needed to fake up the definition. llvm-svn: 227939
* Add cc1 option '-fmodule-feature' to add custom values for 'requires' declsBen Langmuir2015-02-022-1/+9
| | | | | | | This allows clang-based tools to specify custom features that can be tested by the 'requires' declaration in a module map file. llvm-svn: 227868
* [modules] When we try to complete the redeclaration chain for a class templateRichard Smith2015-01-314-0/+16
| | | | | | 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-246-0/+27
| | | | | | | | | | | 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
* Fix reference to sysroot in this test (broken in r226875).Richard Smith2015-01-231-1/+1
| | | | llvm-svn: 226885
* PR22299: Relocate code for handling -fmodule-map-file= so that we don't try toRichard Smith2015-01-231-0/+8
| | | | | | | produce diagnostics with source locations before the diagnostics system is ready for them. llvm-svn: 226882
* Reorganize test/Modules:Richard Smith2015-01-2223-15/+13
| | | | | | | * Put all input files under Inputs/, move corresponding tests into test/Modules. * Rename a modulemap test file to [...].modulemap, and teach lit that such files are tests. llvm-svn: 226875
* [modules] If we add an implicit special member to a class through an updateRichard Smith2015-01-225-0/+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
* Fix test file names so they're picked up by lit.Richard Smith2015-01-222-0/+0
| | | | llvm-svn: 226776
* [modules] If we load two declarations with typedef names for linkage purposesRichard Smith2015-01-224-0/+12
| | | | | | | 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-225-0/+21
| | | | | | | 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 compiler_builtins.m test to not rely on including system stdlib.h and ↵Hans Wennborg2015-01-223-2/+3
| | | | | | | | | | | | | | malloc.h Importing _Builtin_intrinsics.sse and avx would transitively pull in those headers, and the test would fail when building in an environment where they were not available on the include path. This fixes PR20995 for me. Differential Revision: http://reviews.llvm.org/D7112 llvm-svn: 226754
* Emit DeferredDeclsToEmit in a DFS order.Rafael Espindola2015-01-222-17/+17
| | | | | | | | | | | | | | Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that. The advantages of the change are that * The output order is a bit closer to the source order. The change to test/CodeGenCXX/pod-member-memcpys.cpp is a good example. * If we decide to deffer more, it will not cause as large changes in the estcases as it would without this patch. llvm-svn: 226751
* Inherit attributes when infering a framework moduleBen Langmuir2015-01-133-0/+8
| | | | | | | | | | If a module map contains framework module * [extern_c] {} We will now infer [extern_c] on the inferred framework modules (we already inferred [system] as a special case). llvm-svn: 225803
* Fix bogus 'method is unavailable' errors with modulesBen Langmuir2015-01-126-0/+47
| | | | | | | | 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
* Remove unused test input.Nico Weber2014-12-231-5/+0
| | | | llvm-svn: 224784
* Enabling this test again on mingw. The problem seems to happen whenYaron Keren2014-12-181-1/+0
| | | | | | | two identical module.modulemap are available on the include path and so should be fixed in the mingw driver include dies, when we'll have it. llvm-svn: 224515
* This test does not pass for -target i686-pc-windows-gnu (-mingw32)Yaron Keren2014-12-171-0/+1
| | | | | | | when clang is built with mingw-w64 4.9.1 or according to http://llvm.org/PR20995 , mingw-w64 4.7.2 as well. llvm-svn: 224453
* IR: Make metadata typeless in assembly, clang sideDuncan P. N. Exon Smith2014-12-151-8/+8
| | | | | | Match LLVM changes from r224257. llvm-svn: 224259
* Frontend: Canonicalize to native paths when dumping module dependenciesJustin Bogner2014-12-121-5/+5
| | | | | | | | | | | | Mixed path separators (ie, both / and \\) can mess up the sort order of the VFS map when dumping module dependencies, as was recently exposed by r224055 and papered over in r224145. Instead, we should simply use native paths for consistency. This also adds a TODO to add handling of .. in paths. There was some code for this before r224055, but it was untested and probably broken. llvm-svn: 224164
* Allow module deps to be printed in an arbitrary orderReid Kleckner2014-12-121-5/+5
| | | | | | | The order is different between Windows and Unix for reasons unknown, but the compiler output appears to still be determinstic. llvm-svn: 224145
* [modules] When constructing paths relative to a module, strip out /./ directoryRichard Smith2014-12-117-6/+61
| | | | | | | components. These sometimes get synthetically added, and we don't want -Ifoo and -I./foo to be treated fundamentally differently here. llvm-svn: 224055
* clang/test/Modules/modular_maps.cpp REQUIRES shell. chdir is unsupported on ↵NAKAMURA Takumi2014-12-101-0/+3
| | | | | | Lit internal runner. llvm-svn: 223921
* Reinstate r223753, reverted in r223759 due to breakage of clang-tools-extra.Richard Smith2014-12-106-0/+36
| | | | | | | | | | | | | | | | | Original commit message: [modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1. For files named by -fmodule-map-file=, and files found by 'extern module' directives, this flag specifies that we should resolve filenames relative to the current working directory rather than relative to the directory in which the module map file resides. This is aimed at fixing path handling, in particular for relative -I paths, when building modules that represent components of the current project (rather than libraries installed on the current system, which the current project has as dependencies, where we'd typically expect the module map files to be looked up implicitly). llvm-svn: 223913
* Revert "[modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1."Duncan P. N. Exon Smith2014-12-096-36/+0
| | | | | | | | | | | | | This reverts commit r223753. It broke the Green Dragon build for a few hours: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/2259/ http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/2259/consoleFull#43901905849ba4694-19c4-4d7e-bec5-911270d8a58c I suspect `clang-tools-extra` just needs a follow-up for an API change, but I'm not the right one to look into it. llvm-svn: 223759
* [modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1.Richard Smith2014-12-096-0/+36
| | | | | | | | | | | | | For files named by -fmodule-map-file=, and files found by 'extern module' directives, this flag specifies that we should resolve filenames relative to the current working directory rather than relative to the directory in which the module map file resides. This is aimed at fixing path handling, in particular for relative -I paths, when building modules that represent components of the current project (rather than libraries installed on the current system, which the current project has as dependencies, where we'd typically expect the module map files to be looked up implicitly). llvm-svn: 223753
* [modules] If the same .pcm file is imported via two different paths, don'tRichard Smith2014-12-091-0/+49
| | | | | | complain that the contained modules are defined twice. llvm-svn: 223724
* Add some file content to avoid test failures on content-addressed file systems.Richard Smith2014-12-062-0/+2
| | | | llvm-svn: 223596
* Add test file missed from r223561.Richard Smith2014-12-061-0/+3
| | | | llvm-svn: 223595
* [modules] If we import a module, and we've seen a module map that describes theRichard Smith2014-12-068-2/+33
| | | | | | | | | module, use the path from the module map file in preference to the path from the .pcm file when resolving relative paths in the .pcm file. This allows diagnostics (and .d output) to give relative paths if the module was found via a relative path. llvm-svn: 223577
* clang/test/Modules/malformed.cpp REQUIRES shell due to "cd".NAKAMURA Takumi2014-12-021-0/+2
| | | | llvm-svn: 223107
* [modules] Track how 'header' directives were written in module map files,Richard Smith2014-12-021-10/+14
| | | | | | | | | | | | | rather than trying to extract this information from the FileEntry after the fact. This has a number of beneficial effects. For instance, diagnostic messages for failed module builds give a path relative to the "module root" rather than an absolute file path, and the contents of the module includes file is no longer dependent on what files the including TU happened to inspect prior to triggering the module build. llvm-svn: 223095
* Add flag -f(no-)modules-implicit-maps.Daniel Jasper2014-11-251-0/+3
| | | | | | | This suppresses the implicit search for files called 'module.modulemap' and similar. llvm-svn: 222745
* [modules] When explicitly importing a module, it's fine for the imported moduleRichard Smith2014-11-211-0/+20
| | | | | | | | to be newer than we were expecting. That happens if .pcm's get moved between file systems during a distributed build. (It's still not OK for them to actually be different, though, so we still check the size and signature matches.) llvm-svn: 222507
* Validate user headers even if -fmodules-validate-once-per-build-sessionBen Langmuir2014-11-101-7/+21
| | | | | | | | is enabled. Unlike system headers, we want to be more careful about modifications to user headers, because it's still easy to edit a header while you're building. llvm-svn: 221634
* Check module signature when the module has already been loadedBen Langmuir2014-11-081-0/+17
| | | | | | | | | | We may need to verify the signature on subsequent imports as well, just like we verify the size/modtime: @import A; @import B; // imports A @import C; // imports A llvm-svn: 221569
* Remove superceded warning warn_forgotten_module_headerBen Langmuir2014-11-051-1/+5
| | | | | | | | | | | | This DefaultIgnore warning under -Wincomplete-module was firing on any module map files that happened to be parsed (it's only supposed to fire on headers), and it has been superceded by -Wnon-modular-include-in-module anyway. For compatibility, I rewired -Wincomplete-module to imply -Wnon-modular-include-in-module. llvm-svn: 221357
* clang/test/Modules: Remove "REQUIRES:shell" since they work for me.NAKAMURA Takumi2014-11-0412-14/+0
| | | | llvm-svn: 221261
* [modules] When a .pcm file is explicitly built separately from the translationRichard Smith2014-10-311-0/+7
| | | | | | unit, allow the -O settings of the two compilations to differ. llvm-svn: 220943
* Extend test to check that -D flags do not leak across module boundaries.Richard Smith2014-10-281-3/+20
| | | | llvm-svn: 220782
* [modules] Allow -I, -D, -W flags to change between building a module andRichard Smith2014-10-281-0/+27
| | | | | | | | explicitly using the resulting .pcm file. Unlike for an implicit module build, we don't need nor want to require these flags to match between the module and its users. llvm-svn: 220780
OpenPOWER on IntegriCloud