aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-08-19 02:29:29 +0000
committerDouglas Gregor <dgregor@apple.com>2011-08-19 02:29:29 +0000
commitfac4ece118d43e43e625c6d2b9a98905b1372d51 (patch)
treef0a8c94c98c60c9affc12a55286ffaecfa65556f /lib/Parse/Parser.cpp
parent3b030a28cda2b953758507769c1d436bec5ec45e (diff)
Teach ModuleManager::addModule() to check whether a particular module
has already been loaded before allocating a new Module structure. If the module has already been loaded (uniquing based on file name), then just return the existing module rather than trying to load it again. This allows us to load a DAG of modules. Introduce a simple test case that forms a diamond-shaped module graph, and illustrates that a source file importing the bottom of the diamond can see declarations in all four of the modules that make up the diamond. Note that this version moves the file-opening logic into the module manager, rather than splitting it between the module manager and the AST reader. More importantly, it properly handles the weird-but-possibly-useful case of loading an AST file from "-". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138030 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
0 files changed, 0 insertions, 0 deletions