Implement support for wildcard exports in modules, allowing a module

to re-export anything that it imports. This opt-in feature makes a
module behave more like a header, because it can be used to re-export
the transitive closure of a (sub)module's dependencies.

llvm-svn: 145811
This commit is contained in:
Douglas Gregor
2011-12-05 17:28:06 +00:00
parent 13231037f0
commit f5eedd05db
14 changed files with 143 additions and 14 deletions

View File

@@ -25,6 +25,18 @@ Module::~Module() {
}
bool Module::isSubModuleOf(Module *Other) const {
const Module *This = this;
do {
if (This == Other)
return true;
This = This->Parent;
} while (This);
return false;
}
std::string Module::getFullModuleName() const {
llvm::SmallVector<StringRef, 2> Names;