[cfe-commits] r145812 - /cfe/trunk/lib/Basic/Module.cpp
Douglas Gregor
dgregor at apple.com
Mon Dec 5 09:34:59 PST 2011
Author: dgregor
Date: Mon Dec 5 11:34:59 2011
New Revision: 145812
URL: http://llvm.org/viewvc/llvm-project?rev=145812&view=rev
Log:
Fix printing of wildcard exports.
Modified:
cfe/trunk/lib/Basic/Module.cpp
Modified: cfe/trunk/lib/Basic/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Module.cpp?rev=145812&r1=145811&r2=145812&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Module.cpp (original)
+++ cfe/trunk/lib/Basic/Module.cpp Mon Dec 5 11:34:59 2011
@@ -102,9 +102,14 @@
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 @@
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";
}
More information about the cfe-commits
mailing list