[lld] r262443 - Remove more dead code.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 17:23:29 PST 2016
Author: ruiu
Date: Tue Mar 1 19:23:29 2016
New Revision: 262443
URL: http://llvm.org/viewvc/llvm-project?rev=262443&view=rev
Log:
Remove more dead code.
Modified:
lld/trunk/include/lld/Core/File.h
lld/trunk/include/lld/Core/Resolver.h
lld/trunk/include/lld/Core/Simple.h
lld/trunk/lib/Core/Resolver.cpp
Modified: lld/trunk/include/lld/Core/File.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/File.h?rev=262443&r1=262442&r2=262443&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/File.h (original)
+++ lld/trunk/include/lld/Core/File.h Tue Mar 1 19:23:29 2016
@@ -51,7 +51,6 @@ public:
kindHeaderObject, ///< a file for file headers
kindEntryObject, ///< a file for the entry
kindUndefinedSymsObject, ///< a file for undefined symbols
- kindAliasSymsObject, ///< a file for alias symbols
kindStubHelperObject, ///< a file for stub helpers
kindResolverMergedObject, ///< the resolver merged file.
kindSectCreateObject, ///< a sect create object file (.o)
Modified: lld/trunk/include/lld/Core/Resolver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Resolver.h?rev=262443&r1=262442&r2=262443&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Resolver.h (original)
+++ lld/trunk/include/lld/Core/Resolver.h Tue Mar 1 19:23:29 2016
@@ -32,9 +32,7 @@ class LinkingContext;
/// and producing a merged graph.
class Resolver {
public:
- Resolver(LinkingContext &ctx)
- : _ctx(ctx), _symbolTable(), _result(new MergedFile()),
- _fileIndex(0) {}
+ Resolver(LinkingContext &ctx) : _ctx(ctx), _result(new MergedFile()) {}
// InputFiles::Handler methods
void doDefinedAtom(const DefinedAtom&);
@@ -69,7 +67,6 @@ private:
void deadStripOptimize();
bool checkUndefines();
void removeCoalescedAwayAtoms();
- void checkDylibSymbolCollisions();
ErrorOr<bool> forEachUndefines(File &file, bool searchForOverrides,
UndefCallback callback);
@@ -94,7 +91,6 @@ private:
// --start-group and --end-group
std::vector<File *> _files;
std::map<File *, bool> _newUndefinesAdded;
- size_t _fileIndex;
// List of undefined symbols.
std::vector<StringRef> _undefines;
Modified: lld/trunk/include/lld/Core/Simple.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Simple.h?rev=262443&r1=262442&r2=262443&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Simple.h (original)
+++ lld/trunk/include/lld/Core/Simple.h Tue Mar 1 19:23:29 2016
@@ -17,7 +17,6 @@
#include "lld/Core/DefinedAtom.h"
#include "lld/Core/File.h"
-#include "lld/Core/ArchiveLibraryFile.h"
#include "lld/Core/LinkingContext.h"
#include "lld/Core/Reference.h"
#include "lld/Core/UndefinedAtom.h"
@@ -81,48 +80,6 @@ private:
AtomVector<AbsoluteAtom> _absolute;
};
-/// \brief Archive library file that may be used as a virtual container
-/// for symbols that should be added dynamically in response to
-/// call to find() method.
-class SimpleArchiveLibraryFile : public ArchiveLibraryFile {
-public:
- SimpleArchiveLibraryFile(StringRef filename)
- : ArchiveLibraryFile(filename) {}
-
- const AtomVector<DefinedAtom> &defined() const override {
- return _definedAtoms;
- }
-
- const AtomVector<UndefinedAtom> &undefined() const override {
- return _undefinedAtoms;
- }
-
- const AtomVector<SharedLibraryAtom> &sharedLibrary() const override {
- return _sharedLibraryAtoms;
- }
-
- const AtomVector<AbsoluteAtom> &absolute() const override {
- return _absoluteAtoms;
- }
-
- File *find(StringRef sym, bool dataSymbolOnly) override {
- // For descendants:
- // do some checks here and return dynamically generated files with atoms.
- return nullptr;
- }
-
- std::error_code
- parseAllMembers(std::vector<std::unique_ptr<File>> &result) override {
- return std::error_code();
- }
-
-private:
- AtomVector<DefinedAtom> _definedAtoms;
- AtomVector<UndefinedAtom> _undefinedAtoms;
- AtomVector<SharedLibraryAtom> _sharedLibraryAtoms;
- AtomVector<AbsoluteAtom> _absoluteAtoms;
-};
-
class SimpleReference : public Reference {
public:
SimpleReference(Reference::KindNamespace ns, Reference::KindArch arch,
@@ -322,23 +279,6 @@ private:
StringRef _name;
};
-class SimpleAbsoluteAtom : public AbsoluteAtom {
-public:
- SimpleAbsoluteAtom(const File &f, StringRef name, Scope s, uint64_t value)
- : _file(f), _name(name), _scope(s), _value(value) {}
-
- const File &file() const override { return _file; }
- StringRef name() const override { return _name; }
- uint64_t value() const override { return _value; }
- Scope scope() const override { return _scope; }
-
-private:
- const File &_file;
- StringRef _name;
- Scope _scope;
- uint64_t _value;
-};
-
} // end namespace lld
#endif
Modified: lld/trunk/lib/Core/Resolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Resolver.cpp?rev=262443&r1=262442&r2=262443&view=diff
==============================================================================
--- lld/trunk/lib/Core/Resolver.cpp (original)
+++ lld/trunk/lib/Core/Resolver.cpp Tue Mar 1 19:23:29 2016
@@ -264,7 +264,6 @@ bool Resolver::resolveUndefines() {
case File::kindHeaderObject:
case File::kindEntryObject:
case File::kindUndefinedSymsObject:
- case File::kindAliasSymsObject:
case File::kindStubHelperObject:
case File::kindResolverMergedObject:
case File::kindSectCreateObject: {
More information about the llvm-commits
mailing list