summaryrefslogtreecommitdiffstats
path: root/lld/lib/Core/SymbolTable.cpp
diff options
context:
space:
mode:
authorNick Kledzik <kledzik@apple.com>2013-04-04 18:59:24 +0000
committerNick Kledzik <kledzik@apple.com>2013-04-04 18:59:24 +0000
commitc314b46e718bb5f23ca257af2331c120891361b2 (patch)
treeb0c6c6a9688cadb233589dc5e317df5d05d89cba /lld/lib/Core/SymbolTable.cpp
parent83f1be1bfc3112d0edba33ed6d8e1a751844b06f (diff)
downloadbcm5719-llvm-c314b46e718bb5f23ca257af2331c120891361b2.tar.gz
bcm5719-llvm-c314b46e718bb5f23ca257af2331c120891361b2.zip
This is my Driver refactoring patch.
The major changes are: 1) LinkerOptions has been merged into TargetInfo 2) LinkerInvocation has been merged into Driver 3) Drivers no longer convert arguments into an intermediate (core) argument list, but instead create a TargetInfo object and call setter methods on it. This is only how in-process linking would work. That is, you can programmatically set up a TargetInfo object which controls the linking. 4) Lots of tweaks to test suite to work with driver changes 5) Add the DarwinDriver 6) I heavily doxygen commented TargetInfo.h Things to do after this patch is committed: a) Consider renaming TargetInfo, given its new roll. b) Consider pulling the list of input files out of TargetInfo. This will enable in-process clients to create one TargetInfo the re-use it with different input file lists. c) Work out a way for Drivers to format the warnings and error done in core linking. llvm-svn: 178776
Diffstat (limited to 'lld/lib/Core/SymbolTable.cpp')
-rw-r--r--lld/lib/Core/SymbolTable.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lld/lib/Core/SymbolTable.cpp b/lld/lib/Core/SymbolTable.cpp
index 36e52d8ed07..4ded5a62597 100644
--- a/lld/lib/Core/SymbolTable.cpp
+++ b/lld/lib/Core/SymbolTable.cpp
@@ -13,7 +13,6 @@
#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"
@@ -184,8 +183,7 @@ void SymbolTable::addByName(const Atom & newAtom) {
useNew = false;
}
else {
- if (_targetInfo.getLinkerOptions().
- _warnIfCoalesableAtomsHaveDifferentCanBeNull) {
+ if (_targetInfo.warnIfCoalesableAtomsHaveDifferentCanBeNull()) {
// FIXME: need diagonstics interface for writing warning messages
llvm::errs() << "lld warning: undefined symbol "
<< existingUndef->name()
@@ -210,8 +208,7 @@ void SymbolTable::addByName(const Atom & newAtom) {
bool sameName = curShLib->loadName().equals(newShLib->loadName());
if ( !sameName ) {
useNew = false;
- if (_targetInfo.getLinkerOptions().
- _warnIfCoalesableAtomsHaveDifferentLoadName) {
+ if (_targetInfo.warnIfCoalesableAtomsHaveDifferentLoadName()) {
// FIXME: need diagonstics interface for writing warning messages
llvm::errs() << "lld warning: shared library symbol "
<< curShLib->name()
@@ -223,8 +220,7 @@ void SymbolTable::addByName(const Atom & newAtom) {
}
else if ( ! sameNullness ) {
useNew = false;
- if (_targetInfo.getLinkerOptions().
- _warnIfCoalesableAtomsHaveDifferentCanBeNull) {
+ if (_targetInfo.warnIfCoalesableAtomsHaveDifferentCanBeNull()) {
// FIXME: need diagonstics interface for writing warning messages
llvm::errs() << "lld warning: shared library symbol "
<< curShLib->name()
OpenPOWER on IntegriCloud