diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-05 17:34:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-05 17:34:59 +0000 |
commit | f4ac17e51f9841e05e5cc17d65f27f0d1cc62fcb (patch) | |
tree | df2f33bfbeff959c6d19812d47ee16fc6102efe2 /lib/Basic | |
parent | 0adaa880993ad23186c87c7f98e7a3fd2697742c (diff) |
Fix printing of wildcard exports.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic')
-rw-r--r-- | lib/Basic/Module.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/Basic/Module.cpp b/lib/Basic/Module.cpp index 59fced5f16..c3a8a377c4 100644 --- a/lib/Basic/Module.cpp +++ b/lib/Basic/Module.cpp @@ -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"; } |