summaryrefslogtreecommitdiffstats
path: root/lld/lib/Core/SymbolTable.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2013-01-22 20:49:42 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2013-01-22 20:49:42 +0000
commit4586fbcbadbb7b4240de056aacc659c4aea2e861 (patch)
treef9b18def7c6a2c4ad6d513286246aad8a1b6f0b7 /lld/lib/Core/SymbolTable.cpp
parent0c0c02c479cf6f3959d895c1b49ee91b726849aa (diff)
downloadbcm5719-llvm-4586fbcbadbb7b4240de056aacc659c4aea2e861.tar.gz
bcm5719-llvm-4586fbcbadbb7b4240de056aacc659c4aea2e861.zip
[Core] Move Resolver and SymbolTable over to TargetInfo.
No functionality change. llvm-svn: 173192
Diffstat (limited to 'lld/lib/Core/SymbolTable.cpp')
-rw-r--r--lld/lib/Core/SymbolTable.cpp17
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()
OpenPOWER on IntegriCloud