diff options
Diffstat (limited to 'lld/lib/Core/SymbolTable.cpp')
-rw-r--r-- | lld/lib/Core/SymbolTable.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lld/lib/Core/SymbolTable.cpp b/lld/lib/Core/SymbolTable.cpp index 1c7ea99ff05..7a35ed90144 100644 --- a/lld/lib/Core/SymbolTable.cpp +++ b/lld/lib/Core/SymbolTable.cpp @@ -8,14 +8,16 @@ //===----------------------------------------------------------------------===// #include "lld/Core/SymbolTable.h" -#include "lld/Core/Atom.h" #include "lld/Core/AbsoluteAtom.h" +#include "lld/Core/Atom.h" #include "lld/Core/DefinedAtom.h" #include "lld/Core/File.h" #include "lld/Core/InputFiles.h" +#include "lld/Core/LinkerOptions.h" #include "lld/Core/LLVM.h" #include "lld/Core/Resolver.h" #include "lld/Core/SharedLibraryAtom.h" +#include "lld/Core/TargetInfo.h" #include "lld/Core/UndefinedAtom.h" #include "llvm/ADT/ArrayRef.h" @@ -29,9 +31,7 @@ #include <vector> namespace lld { -SymbolTable::SymbolTable(ResolverOptions &opts) - : _options(opts) { -} +SymbolTable::SymbolTable(const TargetInfo &ti) : _targetInfo(ti) {} void SymbolTable::add(const UndefinedAtom &atom) { this->addByName(atom); @@ -183,7 +183,8 @@ void SymbolTable::addByName(const Atom & newAtom) { useNew = false; } else { - if ( _options.warnIfCoalesableAtomsHaveDifferentCanBeNull() ) { + if (_targetInfo.getLinkerOptions(). + _warnIfCoalesableAtomsHaveDifferentCanBeNull) { // FIXME: need diagonstics interface for writing warning messages llvm::errs() << "lld warning: undefined symbol " << existingUndef->name() @@ -208,7 +209,8 @@ void SymbolTable::addByName(const Atom & newAtom) { bool sameName = curShLib->loadName().equals(newShLib->loadName()); if ( !sameName ) { useNew = false; - if ( _options.warnIfCoalesableAtomsHaveDifferentLoadName() ) { + if (_targetInfo.getLinkerOptions(). + _warnIfCoalesableAtomsHaveDifferentLoadName) { // FIXME: need diagonstics interface for writing warning messages llvm::errs() << "lld warning: shared library symbol " << curShLib->name() @@ -220,7 +222,8 @@ void SymbolTable::addByName(const Atom & newAtom) { } else if ( ! sameNullness ) { useNew = false; - if ( _options.warnIfCoalesableAtomsHaveDifferentCanBeNull() ) { + if (_targetInfo.getLinkerOptions(). + _warnIfCoalesableAtomsHaveDifferentCanBeNull) { // FIXME: need diagonstics interface for writing warning messages llvm::errs() << "lld warning: shared library symbol " << curShLib->name() |