forked from OSchip/llvm-project
useNew is set to false in all branches, so set it to false outside the if-else.
llvm-svn: 205642
This commit is contained in:
parent
01cc718375
commit
e8af3e48fd
|
@ -265,28 +265,22 @@ void SymbolTable::addByName(const Atom &newAtom) {
|
|||
bool sameNullness =
|
||||
(curShLib->canBeNullAtRuntime() == newShLib->canBeNullAtRuntime());
|
||||
bool sameName = curShLib->loadName().equals(newShLib->loadName());
|
||||
if (!sameName) {
|
||||
useNew = false;
|
||||
if (_context.warnIfCoalesableAtomsHaveDifferentLoadName()) {
|
||||
// FIXME: need diagonstics interface for writing warning messages
|
||||
llvm::errs() << "lld warning: shared library symbol "
|
||||
<< curShLib->name() << " has different load path in "
|
||||
<< curShLib->file().path() << " and in "
|
||||
<< newShLib->file().path();
|
||||
}
|
||||
} else if (!sameNullness) {
|
||||
useNew = false;
|
||||
if (_context.warnIfCoalesableAtomsHaveDifferentCanBeNull()) {
|
||||
if (sameName && !sameNullness &&
|
||||
_context.warnIfCoalesableAtomsHaveDifferentCanBeNull()) {
|
||||
// FIXME: need diagonstics interface for writing warning messages
|
||||
llvm::errs() << "lld warning: shared library symbol "
|
||||
<< curShLib->name() << " has different weakness in "
|
||||
<< curShLib->file().path() << " and in "
|
||||
<< newShLib->file().path();
|
||||
}
|
||||
} else {
|
||||
// Both shlib atoms are identical and can be coalesced.
|
||||
useNew = false;
|
||||
if (!sameName && _context.warnIfCoalesableAtomsHaveDifferentLoadName()) {
|
||||
// FIXME: need diagonstics interface for writing warning messages
|
||||
llvm::errs() << "lld warning: shared library symbol "
|
||||
<< curShLib->name() << " has different load path in "
|
||||
<< curShLib->file().path() << " and in "
|
||||
<< newShLib->file().path();
|
||||
}
|
||||
useNew = false;
|
||||
break;
|
||||
}
|
||||
case NCR_Error:
|
||||
|
|
Loading…
Reference in New Issue