llvm-project/clang/lib/Lex
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
..
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
HeaderMap.cpp [C++11] Replace OwningPtr include with <memory>. 2014-03-09 11:36:40 +00:00
HeaderSearch.cpp Allow multiple modules with the same name to coexist in the module cache 2014-04-14 18:00:01 +00:00
Lexer.cpp Revert r205436: 2014-04-03 18:04:52 +00:00
LiteralSupport.cpp Remove uses of SmallString::equals in favor of SmallVectorImpl<char>'s operator== 2014-03-09 05:18:27 +00:00
MacroArgs.cpp [Preprocessor] For the MacroExpands preprocessor callback, also pass the MacroArgs object that provides information about 2013-05-03 22:31:32 +00:00
MacroInfo.cpp [Preprocessor/CodeComplete] Don't add include guard macros to code-completion results. 2014-04-09 18:21:23 +00:00
Makefile
ModuleMap.cpp Allow multiple modules with the same name to coexist in the module cache 2014-04-14 18:00:01 +00:00
PPCaching.cpp Fix the build break introduced by r195799 by restoring two close 2013-11-27 01:40:12 +00:00
PPCallbacks.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
PPConditionalDirectiveRecord.cpp Changed ConditionValue argument to PPCallbacks If and Elif callbacks to be a 3-state enum. 2013-12-07 08:41:15 +00:00
PPDirectives.cpp Use the expansion location of the file name when finding the module. 2014-03-19 10:22:36 +00:00
PPExpressions.cpp Add two missing entries to the C++11 support page. Bump one relevant diagnostic 2014-03-14 21:21:24 +00:00
PPLexerChange.cpp [Preprocessor/CodeComplete] Don't add include guard macros to code-completion results. 2014-04-09 18:21:23 +00:00
PPMacroExpansion.cpp Add a test to distinguish between reserved tokens and normal identifiers. 2014-04-11 20:55:19 +00:00
PTHLexer.cpp Reapply "OnDiskHashTable: Use Endian.h to read little endian ostreams" 2014-03-28 22:03:24 +00:00
Pragma.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-11 06:50:42 +00:00
PreprocessingRecord.cpp [libclang] Record ranges skipped by the preprocessor and expose them with libclang. 2013-12-05 08:19:32 +00:00
Preprocessor.cpp Preprocessor: Clarify the ownership of the IncludeMacroStack with unique_ptr. 2014-03-15 16:40:40 +00:00
PreprocessorLexer.cpp Make Preprocessor::Lex non-recursive. 2013-09-19 00:41:32 +00:00
ScratchBuffer.cpp Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset. 2011-09-19 20:40:19 +00:00
TokenConcatenation.cpp Revert "Fix assertion failures on annot_* tokens in clang -E" 2014-01-30 21:50:18 +00:00
TokenLexer.cpp If the first token in a macro that appears at the start of a line expands to 2014-02-24 20:45:00 +00:00
UnicodeCharSets.h Fix the range for Malayam UCNs in C99. 2014-02-05 15:32:23 +00:00