diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-03-20 21:10:35 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-03-20 21:10:35 +0000 |
commit | 906d66acc5cf2679453e10a4f0a67feedd765b21 (patch) | |
tree | 8c31690c89bdf0b16fedd5a2db26c49048824559 /lib/Basic/Module.cpp | |
parent | f8e2c06cea1548c437761cb65cfbf97d50a057a7 (diff) |
<rdar://problem/12368093> Extend module maps with a 'conflict' declaration, and warn when a newly-imported module conflicts with an already-imported module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Module.cpp')
-rw-r--r-- | lib/Basic/Module.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Basic/Module.cpp b/lib/Basic/Module.cpp index 197c53fb14..13518cde66 100644 --- a/lib/Basic/Module.cpp +++ b/lib/Basic/Module.cpp @@ -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) |