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 | fb9126578ec3b320272da281ce60aa7cd11e8a06 (patch) | |
tree | 80741c94fb3866a65a264e1eaab661861bb0b165 /clang/lib/Basic/Module.cpp | |
parent | f83a664a4074ef5b15a209d6c9fa17253bff7681 (diff) | |
download | bcm5719-llvm-fb9126578ec3b320272da281ce60aa7cd11e8a06.tar.gz bcm5719-llvm-fb9126578ec3b320272da281ce60aa7cd11e8a06.zip |
<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
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
-rw-r--r-- | clang/lib/Basic/Module.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp index 197c53fb149..13518cde664 100644 --- a/clang/lib/Basic/Module.cpp +++ b/clang/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) |