Commit Graph

12 Commits

Author SHA1 Message Date
Adrian Prantl e299f547a3 Fix a bug preventing the cause for a module file-not-found from being displayed
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280010 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-29 20:46:59 +00:00
Adrian Prantl fb7704603f Fix a bug preventing the cause of a module-out-of-date error from being printed
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280009 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-29 20:46:56 +00:00
Richard Smith 378d67ec54 [modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single
option. Previously these options could both be used to specify that you were
compiling the implementation file of a module, with a different set of minor
bugs in each case.

This change removes -fmodule-implementation-of, and instead tracks a flag to
determine whether we're currently building a module. -fmodule-name now behaves
the same way that -fmodule-implementation-of previously did.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261372 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-19 22:25:36 +00:00
NAKAMURA Takumi 4ae5b05248 clang/test/Modules: Satisfy win32 hosts due to dospath issue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244427 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-09 22:55:50 +00:00
Richard Smith 5624537c4c [modules] PR22534: Load files specified by -fmodule-file= eagerly. In particular, this avoids the need to re-parse module map files when using such a module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244416 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-09 08:48:41 +00:00
Richard Smith 6e03dd94ce [modules] Simplify -cc1 interface for enabling implicit module maps.
We used to have a flag to enable module maps, and two more flags to enable
implicit module maps. This is all redundant; we don't need any flag for
enabling module maps in the abstract, and we don't usually have -fno- flags for
-cc1. We now have just a single flag, -fimplicit-module-maps, that enables
implicitly searching the file system for module map files and loading them.

The driver interface is unchanged for now. We should probably rename
-fmodule-maps to -fimplicit-module-maps at some point.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239789 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-16 00:08:24 +00:00
Richard Smith cdecc265d4 Make module files passed to a module build via -fmodule-file= available to
consumers of that module.

Previously, such a file would only be available if the module happened to
actually import something from that module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232583 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-18 01:42:29 +00:00
Richard Smith 1b1758f780 Give better diagnostics when -fmodule-file= finds a bad file: if the file is
found indirectly, explain how we got there, and distinguish between 'file not
found' and 'file found but invalid'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230839 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-28 03:09:52 +00:00
Richard Smith 50a1b4104c [modules] When explicitly importing a module, it's fine for the imported module
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.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222507 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-21 05:37:20 +00:00
NAKAMURA Takumi fdc0bc7a5a clang/test/Modules/explicit-build.cpp: Tweak to meet win32's backslash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220770 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-28 11:34:29 +00:00
Richard Smith 489c8c9c1c [modules] Load .pcm files specified by -fmodule-file lazily.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220731 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-27 23:01:16 +00:00
Richard Smith 732cea5e28 [modules] Initial support for explicitly loading .pcm files.
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220359 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-22 02:05:46 +00:00