<rdar://problem/12368093> Extend module maps with a 'conflict' declaration, and warn when a newly-imported module conflicts with an already-imported module.

llvm-svn: 177577
This commit is contained in:
Douglas Gregor
2013-03-20 21:10:35 +00:00
parent f83a664a40
commit fb9126578e
25 changed files with 328 additions and 63 deletions

View File

@@ -347,6 +347,24 @@ void Module::print(raw_ostream &OS, unsigned Indent) const {
OS << "\"";
}
for (unsigned I = 0, N = UnresolvedConflicts.size(); I != N; ++I) {
OS.indent(Indent + 2);
OS << "conflict ";
printModuleId(OS, UnresolvedConflicts[I].Id);
OS << ", \"";
OS.write_escaped(UnresolvedConflicts[I].Message);
OS << "\"\n";
}
for (unsigned I = 0, N = Conflicts.size(); I != N; ++I) {
OS.indent(Indent + 2);
OS << "conflict ";
OS << Conflicts[I].Other->getFullModuleName();
OS << ", \"";
OS.write_escaped(Conflicts[I].Message);
OS << "\"\n";
}
if (InferSubmodules) {
OS.indent(Indent + 2);
if (InferExplicitSubmodules)