summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
Commit message (Collapse)AuthorAgeFilesLines
* 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
* clang/test/Modules/explicit-build.cpp: Tweak to meet win32's backslash.NAKAMURA Takumi2014-10-281-1/+1
| | | | llvm-svn: 220770
* [modules] Load .pcm files specified by -fmodule-file lazily.Richard Smith2014-10-271-59/+63
| | | | llvm-svn: 220731
* [modules] Support combining 'textual' with 'private'.Richard Smith2014-10-244-1/+22
| | | | llvm-svn: 220589
* Add a "signature" to AST files to verify that they haven't changedBen Langmuir2014-10-231-0/+29
| | | | | | | | | | | | | | | | | | | | | Since the order of the IDs in the AST file (e.g. DeclIDs, SelectorIDs) is not stable, it is not safe to load an AST file that depends on another AST file that has been rebuilt since the importer was built, even if "nothing changed". We previously used size and modtime to check this, but I've seen cases where a module rebuilt quickly enough to foil this check and caused very hard to debug build errors. To save cycles when we're loading the AST, we just generate a random nonce value and check that it hasn't changed when we load an imported module, rather than actually hash the whole file. This is slightly complicated by the fact that we need to verify the signature inside addModule, since we might otherwise consider that a mdoule is "OutOfDate" when really it is the importer that is out of date. I didn't see any regressions in module load time after this change. llvm-svn: 220493
* Revert accidentally-committed files in r220460.Richard Smith2014-10-234-22/+1
| | | | llvm-svn: 220461
* Refactor implementation of 'exclude header'.Richard Smith2014-10-234-1/+22
| | | | | | | | | This was not a real header role, and was never exposed to clients of ModuleMap. Remove the enumeration value for it and track it as marking the header as 'known' rather than creating an extra KnownHeader entry that *every single* client ignores. llvm-svn: 220460
* Test files I forgot to svn add in r220448.Richard Smith2014-10-223-0/+27
| | | | llvm-svn: 220449
* [modules] Add support for 'textual header' directives.Richard Smith2014-10-221-0/+9
| | | | | | | | This allows a module to specify that it logically contains a file, but that said file is non-modular and intended for textual inclusion. This allows layering checks to work properly in the presence of such files. llvm-svn: 220448
* [modules] Initial support for explicitly loading .pcm files.Richard Smith2014-10-226-2/+175
| | | | | | | | | | | | | | | Implicit module builds are not well-suited to a lot of build systems. In particular, they fare badly in distributed build systems, and they lead to build artifacts that are not tracked as part of the usual dependency management process. This change allows explicitly-built module files (which are already supported through the -emit-module flag) to be explicitly loaded into a build, allowing build systems to opt to manage module builds and dependencies themselves. This is only the first step in supporting such configurations, and it should be considered experimental and subject to change or removal for now. llvm-svn: 220359
* [modules] When building an injected-class-name type, we may have to insert itRichard Smith2014-10-215-0/+25
| | | | | | into multiple merged classes' TypeForDecl slots. llvm-svn: 220331
* [modules] Add support for #include_next.Richard Smith2014-10-208-1/+22
| | | | | | | | | | | | #include_next interacts poorly with modules: it depends on where in the list of include paths the current file was found. Files covered by module maps are not found in include search paths when building the module (and are not found in include search paths when @importing the module either), so this isn't really meaningful. Instead, we fake up the result that #include_next *should* have given: find the first path that would have resulted in the given file being picked, and search from there onwards. llvm-svn: 220177
* CodeGen: ConstStructBuilder must verify packed constraints after paddingDavid Majnemer2014-10-191-4/+4
| | | | | | | | | | | | | | | | | | This reverts commit r220169 which reverted r220153. However, it also contains additional changes: - We may need to add padding *after* we've packed the struct. This occurs when the aligned next field offset is greater than the new field's offset. When this occurs, we make the struct packed. *However*, once packed the next field offset might be less than the new feild's offset. It is in this case that we might further pad the struct. - We would pad structs which were perfectly sized! This behavior is immensely old. This behavior came from blindly subtracting NextFieldOffsetInChars from RecordSize. This doesn't take into account the fact that the struct might have a greater overall alignment than the last field. llvm-svn: 220175
* PR21215: Support -fmodule-map-file being specified multiple times. SupportRichard Smith2014-10-174-4/+13
| | | | | | loading multiple module map files from the same directory. llvm-svn: 220020
* Extend -Rmodule-build to also remark when module building finishes.Richard Smith2014-10-141-5/+10
| | | | | | | In cases of nested module builds, or when you care how long module builds take, this information was not previously easily available / obvious. llvm-svn: 219658
* [modules] Merging for class-scope using-declarations.Richard Smith2014-10-144-0/+164
| | | | llvm-svn: 219657
* [modules] When instantiating a class member, don't expect to find the previousRichard Smith2014-10-113-0/+8
| | | | | | | declaration in the instantiation if the previous declaration came from another definition of the class template that got merged into the pattern definition. llvm-svn: 219552
* [modules] Delay loading the field declared with an anonymous tag declarationRichard Smith2014-10-103-0/+17
| | | | | | until after we've had a chance to merge that tag. llvm-svn: 219539
* test: Disable standard system includes in %clang_cc1Justin Bogner2014-10-034-14/+14
| | | | | | | | | | | | | | This adds -nostdsysteminc to the %clang_cc1 expansion, which should make it harder to accidentally write tests that depend on headers in /usr/include. It also updates a few tests that use -isysroot <x> and a darwin triple to omit the triple and use -isystem <x>/usr/include instead, making them a little bit more general. Incidentally, this fixes a test failure I'm seeing on darwin in Modules/stddef.c, that happens because my system finds a stddef.h in /usr/include. llvm-svn: 219030
* Fix interaction of max_align_t and modules.Richard Smith2014-10-035-1/+33
| | | | | | | | | When building with modules enabled, we were defining max_align_t as a typedef for a different anonymous struct type each time it was included, resulting in an error if <stddef.h> is not covered by a module map and is included more than once in the same modules-enabled compilation of C11 or C++11 code. llvm-svn: 218931
* Reduce the PR20399 test case.David Blaikie2014-10-014-79/+30
| | | | | | | | | I couldn't get something /really/ obvious, and I imagine Richard Smith might be able to provide some text explaining the sequence of steps that's demonstrated by these files - but at least it's a bit simpler now. llvm-svn: 218840
* PR20399: Do not assert when adding an implicit member coming from a module atRichard Smith2014-09-306-0/+126
| | | | | | | | writing time. Patch by Vassil Vassilev! llvm-svn: 218651
* PR19692: Add (passing) regression test.Richard Smith2014-09-158-0/+25
| | | | llvm-svn: 217836
* Remove a couple of fixed paths that snuck into my test from 217550Ben Langmuir2014-09-101-2/+2
| | | | | | I forgot to fix these again the second time I copy-and-pasted. llvm-svn: 217552
* Avoid a couple of assertions when preprocessing with modulesBen Langmuir2014-09-104-0/+26
| | | | | | | | | | | | | | | | 1. We were hitting the NextIsPrevious assertion because we were trying to merge decl chains that were independent of each other because we had no Sema object to allow them to find existing decls. This is fixed by delaying loading the "preloaded" decls until Sema is available. 2. We were trying to get identifier info from an annotation token, which asserts. The fix is to special-case the module annotations in the preprocessed output printer. Fixed in a single commit because when you hit 1 you almost invariably hit 2 as well. llvm-svn: 217550
OpenPOWER on IntegriCloud