Fix printing of wildcard exports.

llvm-svn: 145812
This commit is contained in:
Douglas Gregor
2011-12-05 17:34:59 +00:00
parent f5eedd05db
commit 8c7c83522b

View File

@@ -102,9 +102,14 @@ void Module::print(llvm::raw_ostream &OS, unsigned Indent) const {
for (unsigned I = 0, N = Exports.size(); I != N; ++I) {
OS.indent(Indent + 2);
OS << "export " << Exports[I].getPointer()->getFullModuleName();
if (Exports[I].getInt())
OS << ".*";
OS << "export ";
if (Module *Restriction = Exports[I].getPointer()) {
OS << Restriction->getFullModuleName();
if (Exports[I].getInt())
OS << ".*";
} else {
OS << "*";
}
OS << "\n";
}
@@ -112,8 +117,12 @@ void Module::print(llvm::raw_ostream &OS, unsigned Indent) const {
OS.indent(Indent + 2);
OS << "export ";
printModuleId(OS, UnresolvedExports[I].Id);
if (UnresolvedExports[I].Wildcard)
OS << ".*";
if (UnresolvedExports[I].Wildcard) {
if (UnresolvedExports[I].Id.empty())
OS << "*";
else
OS << ".*";
}
OS << "\n";
}