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 | 8c7c83522bd43949f369bb0dbf28b81f9c81f68c (patch) | |
tree | 7367013aa181ef8b82845937841285e62b173994 /clang/lib/Basic/Module.cpp | |
parent | f5eedd05db6dd136fd8a4368fe2f9ffd67f696f0 (diff) | |
download | bcm5719-llvm-8c7c83522bd43949f369bb0dbf28b81f9c81f68c.tar.gz bcm5719-llvm-8c7c83522bd43949f369bb0dbf28b81f9c81f68c.zip |
Fix printing of wildcard exports.
llvm-svn: 145812
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
-rw-r--r-- | clang/lib/Basic/Module.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp index 59fced5f16c..c3a8a377c44 100644 --- a/clang/lib/Basic/Module.cpp +++ b/clang/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"; } |