summaryrefslogtreecommitdiff
path: root/COFF/SymbolTable.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-28 21:23:25 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-28 21:23:25 +0000
commitae1a339de31cf4065777531959a11e55a2e5fa00 (patch)
treeae204c76257fe2799a8fdc5fcb12a2523805c7c8 /COFF/SymbolTable.cpp
parente30c72b844bec93f6c197ea6c7c8cd0188964208 (diff)
Notes
Diffstat (limited to 'COFF/SymbolTable.cpp')
-rw-r--r--COFF/SymbolTable.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/COFF/SymbolTable.cpp b/COFF/SymbolTable.cpp
index 95b48e6d059f..df76679535cb 100644
--- a/COFF/SymbolTable.cpp
+++ b/COFF/SymbolTable.cpp
@@ -117,9 +117,10 @@ void SymbolTable::reportRemainingUndefines() {
for (Symbol *B : Config->GCRoot) {
if (Undefs.count(B))
errorOrWarn("<root>: undefined symbol: " + B->getName());
- if (Symbol *Imp = LocalImports.lookup(B))
- warn("<root>: locally defined symbol imported: " + Imp->getName() +
- " (defined in " + toString(Imp->getFile()) + ")");
+ if (Config->WarnLocallyDefinedImported)
+ if (Symbol *Imp = LocalImports.lookup(B))
+ warn("<root>: locally defined symbol imported: " + Imp->getName() +
+ " (defined in " + toString(Imp->getFile()) + ")");
}
for (ObjFile *File : ObjFile::Instances) {
@@ -128,9 +129,11 @@ void SymbolTable::reportRemainingUndefines() {
continue;
if (Undefs.count(Sym))
errorOrWarn(toString(File) + ": undefined symbol: " + Sym->getName());
- if (Symbol *Imp = LocalImports.lookup(Sym))
- warn(toString(File) + ": locally defined symbol imported: " +
- Imp->getName() + " (defined in " + toString(Imp->getFile()) + ")");
+ if (Config->WarnLocallyDefinedImported)
+ if (Symbol *Imp = LocalImports.lookup(Sym))
+ warn(toString(File) + ": locally defined symbol imported: " +
+ Imp->getName() + " (defined in " + toString(Imp->getFile()) +
+ ")");
}
}
}