diff options
author | Rui Ueyama <ruiu@google.com> | 2014-04-04 18:21:53 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2014-04-04 18:21:53 +0000 |
commit | e8af3e48fd5dffc710a9148282e26e5ab6d65e1d (patch) | |
tree | 53ab26f9b759f70b8b930ad5688ddade23e50dc0 /lld/lib/Core/SymbolTable.cpp | |
parent | 01cc71837504121f8e7cdb6b57b532341e577af9 (diff) | |
download | bcm5719-llvm-e8af3e48fd5dffc710a9148282e26e5ab6d65e1d.tar.gz bcm5719-llvm-e8af3e48fd5dffc710a9148282e26e5ab6d65e1d.zip |
useNew is set to false in all branches, so set it to false outside the if-else.
llvm-svn: 205642
Diffstat (limited to 'lld/lib/Core/SymbolTable.cpp')
-rw-r--r-- | lld/lib/Core/SymbolTable.cpp | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/lld/lib/Core/SymbolTable.cpp b/lld/lib/Core/SymbolTable.cpp index aa35c158737..cb0ff756347 100644 --- a/lld/lib/Core/SymbolTable.cpp +++ b/lld/lib/Core/SymbolTable.cpp @@ -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()) { - // 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 && !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(); } + 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: |