llvm-project/clang/lib/Basic
Ben Langmuir beee15e721 Allow multiple modules with the same name to coexist in the module cache
To differentiate between two modules with the same name, we will
consider the path the module map file that they are defined by* part of
the ‘key’ for looking up the precompiled module (pcm file).
Specifically, this patch renames the precompiled module (pcm) files from
  cache-path/<module hash>/Foo.pcm
to
  cache-path/<module hash>/Foo-<hash of module map path>.pcm

In addition, I’ve taught the ASTReader to re-resolve the names of
imported modules during module loading so that if the header search
context changes between when a module was originally built and when it
is loaded we can rebuild it if necessary.  For example, if module A
imports module B

first time:
clang -I /path/to/A -I /path/to/B ...

second time:
clang -I /path/to/A -I /different/path/to/B ...

will now rebuild A as expected.

* in the case of inferred modules, we use the module map file that
allowed the inference, not the __inferred_module.map file, since the
inferred file path is the same for every inferred module.

llvm-svn: 206201
2014-04-14 18:00:01 +00:00
..
Attributes.cpp Post-commit review coding style change: renaming HasAttribute to hasAttribute. No functional changes. 2014-03-31 15:26:40 +00:00
Builtins.cpp Refactored Builtin::Context::isPrintfLike and isScanfLike into a helper function. The implementations are identical, except for the format arguments being searched for. 2014-01-03 20:10:54 +00:00
CMakeLists.txt Reapplying r204952 a second time. 2014-03-31 13:14:44 +00:00
CharInfo.cpp CharInfo: Add missing "using namespace clang::charinfo" in .cpp file. 2013-02-08 22:37:49 +00:00
Diagnostic.cpp Fix -Wreturn-type build failure on ASTMatchers, plus an intended assert 2014-01-26 08:12:32 +00:00
DiagnosticIDs.cpp Add 'remark' diagnostic type in 'clang' 2014-02-28 09:11:08 +00:00
FileManager.cpp Replace OwningPtr with std::unique_ptr. 2014-03-07 20:03:18 +00:00
FileSystemStatCache.cpp Replace OwningPtr with std::unique_ptr. 2014-03-07 20:03:18 +00:00
IdentifierTable.cpp Fix a typo in r204164 that made *all* keywords available in OpenCL mode. 2014-03-18 22:43:19 +00:00
LangOptions.cpp Add a *San + modules FIXME. 2013-02-07 01:09:29 +00:00
Makefile Use tabs instead of spaces. 2012-03-02 16:06:37 +00:00
Module.cpp Allow multiple modules with the same name to coexist in the module cache 2014-04-14 18:00:01 +00:00
ObjCRuntime.cpp Add a define for the ObjFW runtime ABI version. 2013-09-16 16:31:49 +00:00
OpenMPKinds.cpp [OPENMP] Implemented 'copyin' clause 2014-03-31 03:36:38 +00:00
OperatorPrecedence.cpp Replace C++0x in a comment with C++11 2013-07-14 17:04:56 +00:00
SourceLocation.cpp Only mark dump() function definitions 'used' in debug builds 2014-01-04 13:47:14 +00:00
SourceManager.cpp Remove dead code I introduced 6 years, 4 months ago in r43518. 2014-03-06 21:42:43 +00:00
TargetInfo.cpp Use the new Windows environment for target detection 2014-03-27 22:50:18 +00:00
Targets.cpp [SystemZ] Don't indent SystemZTargetInfo relative to its namespace 2014-04-10 09:56:24 +00:00
TokenKinds.cpp Prospective MSVC 2010 build fix 2014-01-06 15:52:13 +00:00
Version.cpp Remove trailing spaces 2014-01-14 10:25:26 +00:00
VersionTuple.cpp Include llvm::Optional in clang/Basic/LLVM.h 2013-02-20 22:23:23 +00:00
VirtualFileSystem.cpp [C++11] Avoid implicit conversion of ArrayRef to std::vector and use move semantics where appropriate. 2014-03-10 17:55:02 +00:00