forked from OSchip/llvm-project
Revert "temporary commit."
This reverts commit r205635 that was submitted by mistake. llvm-svn: 205637
This commit is contained in:
parent
2e3881c0f5
commit
fbd6c44e6a
|
|
@ -262,37 +262,43 @@ void SymbolTable::addByName(const Atom &newAtom) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case NCR_DupShLib: {
|
case NCR_DupShLib: {
|
||||||
const SharedLibraryAtom *curShLib = dyn_cast<SharedLibraryAtom>(existing);
|
const SharedLibraryAtom* curShLib =
|
||||||
const SharedLibraryAtom *newShLib = dyn_cast<SharedLibraryAtom>(&newAtom);
|
dyn_cast<SharedLibraryAtom>(existing);
|
||||||
assert(curShLib != nullptr);
|
const SharedLibraryAtom* newShLib =
|
||||||
assert(newShLib != nullptr);
|
dyn_cast<SharedLibraryAtom>(&newAtom);
|
||||||
bool sameNullness =
|
assert(curShLib != nullptr);
|
||||||
(curShLib->canBeNullAtRuntime() == newShLib->canBeNullAtRuntime());
|
assert(newShLib != nullptr);
|
||||||
bool sameName = curShLib->loadName().equals(newShLib->loadName());
|
bool sameNullness = (curShLib->canBeNullAtRuntime()
|
||||||
if (!sameName) {
|
== newShLib->canBeNullAtRuntime());
|
||||||
useNew = false;
|
bool sameName = curShLib->loadName().equals(newShLib->loadName());
|
||||||
if (_context.warnIfCoalesableAtomsHaveDifferentLoadName()) {
|
if (!sameName) {
|
||||||
// FIXME: need diagonstics interface for writing warning messages
|
useNew = false;
|
||||||
llvm::errs() << "lld warning: shared library symbol "
|
if (_context.warnIfCoalesableAtomsHaveDifferentLoadName()) {
|
||||||
<< curShLib->name() << " has different load path in "
|
// FIXME: need diagonstics interface for writing warning messages
|
||||||
<< curShLib->file().path() << " and in "
|
llvm::errs() << "lld warning: shared library symbol "
|
||||||
<< newShLib->file().path();
|
<< curShLib->name()
|
||||||
|
<< " has different load path in "
|
||||||
|
<< curShLib->file().path()
|
||||||
|
<< " and in "
|
||||||
|
<< newShLib->file().path();
|
||||||
|
}
|
||||||
|
} else if (!sameNullness) {
|
||||||
|
useNew = false;
|
||||||
|
if (_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;
|
||||||
}
|
}
|
||||||
} else if (!sameNullness) {
|
|
||||||
useNew = false;
|
|
||||||
if (_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;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case NCR_Error:
|
case NCR_Error:
|
||||||
llvm::errs() << "SymbolTable: error while merging " << name << "\n";
|
llvm::errs() << "SymbolTable: error while merging " << name << "\n";
|
||||||
llvm::report_fatal_error("duplicate symbol error");
|
llvm::report_fatal_error("duplicate symbol error");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue