summaryrefslogtreecommitdiff
path: root/lib/Basic/Module.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:44:14 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:44:14 +0000
commit2b6b257f4e5503a7a2675bdb8735693db769f75c (patch)
treee85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /lib/Basic/Module.cpp
parentb4348ed0b7e90c0831b925fbee00b5f179a99796 (diff)
Notes
Diffstat (limited to 'lib/Basic/Module.cpp')
-rw-r--r--lib/Basic/Module.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/Basic/Module.cpp b/lib/Basic/Module.cpp
index 0b78326369439..3d1a40db5ea20 100644
--- a/lib/Basic/Module.cpp
+++ b/lib/Basic/Module.cpp
@@ -418,12 +418,8 @@ void Module::print(raw_ostream &OS, unsigned Indent) const {
OS.indent(Indent + 2);
OS << "export ";
printModuleId(OS, UnresolvedExports[I].Id);
- if (UnresolvedExports[I].Wildcard) {
- if (UnresolvedExports[I].Id.empty())
- OS << "*";
- else
- OS << ".*";
- }
+ if (UnresolvedExports[I].Wildcard)
+ OS << (UnresolvedExports[I].Id.empty() ? "*" : ".*");
OS << "\n";
}
@@ -486,12 +482,13 @@ void Module::print(raw_ostream &OS, unsigned Indent) const {
OS << "}\n";
}
-void Module::dump() const {
+LLVM_DUMP_METHOD void Module::dump() const {
print(llvm::errs());
}
void VisibleModuleSet::setVisible(Module *M, SourceLocation Loc,
VisibleCallback Vis, ConflictCallback Cb) {
+ assert(Loc.isValid() && "setVisible expects a valid import location");
if (isVisible(M))
return;