summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/LiteralSupport.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
commit4dd3e948ef81134b545ffc9e416b8410507cfb60 (patch)
tree5d4f0258dd131ebc1b67848c3da54007da04596d /clang/lib/Lex/LiteralSupport.cpp
parent22241acc29b827cf0dcdaa4a7f21fb7992584fbc (diff)
downloadbcm5719-llvm-4dd3e948ef81134b545ffc9e416b8410507cfb60.tar.gz
bcm5719-llvm-4dd3e948ef81134b545ffc9e416b8410507cfb60.zip
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 "-". llvm-svn: 138030
Diffstat (limited to 'clang/lib/Lex/LiteralSupport.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud