From c314b46e718bb5f23ca257af2331c120891361b2 Mon Sep 17 00:00:00 2001 From: Nick Kledzik Date: Thu, 4 Apr 2013 18:59:24 +0000 Subject: 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 --- lld/lib/Core/SymbolTable.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lld/lib/Core/SymbolTable.cpp') 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() -- cgit v1.2.3