From 352e7308c0e3695d418c53e03fafb2a60af5e5d2 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 27 Aug 2013 00:04:42 +0000 Subject: [PATCH] Rename ti -> ctx. This should have been done in r187823 when I renamed LinkingContext from TargetInfo. I missed a few files. llvm-svn: 189298 --- lld/docs/llvm-theme/static/logo.png | Bin 9864 -> 9865 bytes lld/include/lld/Core/File.h | 4 ++-- lld/lib/ReaderWriter/CoreLinkingContext.cpp | 7 ++++--- lld/lib/ReaderWriter/ELF/DynamicFile.h | 6 +++--- .../ELF/Hexagon/HexagonTargetHandler.cpp | 6 +++--- lld/lib/ReaderWriter/ELF/Reader.cpp | 12 ++++++------ .../ELF/X86_64/X86_64LinkingContext.cpp | 8 ++++---- .../PECOFF/LinkerGeneratedSymbolFile.h | 6 +++--- 8 files changed, 25 insertions(+), 24 deletions(-) diff --git a/lld/docs/llvm-theme/static/logo.png b/lld/docs/llvm-theme/static/logo.png index 18d424c53c09a76f87bf92ff6276155f9b4a1771..4fc899028dc6e5209456633a786d7748bbcb503c 100644 GIT binary patch delta 16 XcmeD1?eyIs!q1#sQn6W#zepSaFj@sN delta 15 WcmeD5?eN_o!p~HaxmldQNE`qvWCXwf diff --git a/lld/include/lld/Core/File.h b/lld/include/lld/Core/File.h index dcb1f6a5c830..6a555c62c884 100644 --- a/lld/include/lld/Core/File.h +++ b/lld/include/lld/Core/File.h @@ -240,8 +240,8 @@ public: protected: /// \brief only subclasses of MutableFile can be instantiated - MutableFile(const LinkingContext &ti, StringRef p) - : File(p, kindObject), _context(ti) {} + MutableFile(const LinkingContext &ctx, StringRef p) + : File(p, kindObject), _context(ctx) {} private: const LinkingContext &_context; diff --git a/lld/lib/ReaderWriter/CoreLinkingContext.cpp b/lld/lib/ReaderWriter/CoreLinkingContext.cpp index 8c7b0b763245..f82105e81f99 100644 --- a/lld/lib/ReaderWriter/CoreLinkingContext.cpp +++ b/lld/lib/ReaderWriter/CoreLinkingContext.cpp @@ -151,7 +151,8 @@ private: class TestingPassFile : public MutableFile { public: - TestingPassFile(const LinkingContext &ti) : MutableFile(ti, "Testing pass") {} + TestingPassFile(const LinkingContext &ctx) + : MutableFile(ctx, "Testing pass") {} virtual void addAtom(const Atom &atom) { if (const DefinedAtom *defAtom = dyn_cast(&atom)) @@ -207,7 +208,7 @@ const TestingKindMapping sKinds[] = { class TestingStubsPass : public StubsPass { public: - TestingStubsPass(const LinkingContext &ti) : _file(TestingPassFile(ti)) {} + TestingStubsPass(const LinkingContext &ctx) : _file(TestingPassFile(ctx)) {} virtual bool noTextRelocs() { return true; } @@ -237,7 +238,7 @@ private: class TestingGOTPass : public GOTPass { public: - TestingGOTPass(const LinkingContext &ti) : _file(TestingPassFile(ti)) {} + TestingGOTPass(const LinkingContext &ctx) : _file(TestingPassFile(ctx)) {} virtual bool noTextRelocs() { return true; } diff --git a/lld/lib/ReaderWriter/ELF/DynamicFile.h b/lld/lib/ReaderWriter/ELF/DynamicFile.h index 04ed72ab96c5..442382421c89 100644 --- a/lld/lib/ReaderWriter/ELF/DynamicFile.h +++ b/lld/lib/ReaderWriter/ELF/DynamicFile.h @@ -25,11 +25,11 @@ namespace elf { template class DynamicFile LLVM_FINAL : public SharedLibraryFile { public: static ErrorOr > - create(const ELFLinkingContext &ti, std::unique_ptr mb) { + create(const ELFLinkingContext &ctx, std::unique_ptr mb) { std::unique_ptr file( - new DynamicFile(ti, mb->getBufferIdentifier())); + new DynamicFile(ctx, mb->getBufferIdentifier())); - bool useShlibUndefines = ti.useShlibUndefines(); + bool useShlibUndefines = ctx.useShlibUndefines(); error_code ec; file->_objFile.reset(new llvm::object::ELFFile(mb.release(), ec)); diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp index 142d6f098ad7..30cff8c591b0 100644 --- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp +++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp @@ -144,8 +144,8 @@ protected: } public: - GOTPLTPass(const ELFLinkingContext &ti) - : _file(ti), _null(nullptr), _PLT0(nullptr), _got0(nullptr) {} + GOTPLTPass(const ELFLinkingContext &ctx) + : _file(ctx), _null(nullptr), _PLT0(nullptr), _got0(nullptr) {} /// \brief Do the pass. /// @@ -212,7 +212,7 @@ protected: class DynamicGOTPLTPass LLVM_FINAL : public GOTPLTPass { public: - DynamicGOTPLTPass(const elf::HexagonLinkingContext &ti) : GOTPLTPass(ti) { + DynamicGOTPLTPass(const elf::HexagonLinkingContext &ctx) : GOTPLTPass(ctx) { _got0 = new (_file._alloc) HexagonGOTPLT0Atom(_file); #ifndef NDEBUG _got0->_name = "__got0"; diff --git a/lld/lib/ReaderWriter/ELF/Reader.cpp b/lld/lib/ReaderWriter/ELF/Reader.cpp index 4225a332cb11..0cbb86ebd4b3 100644 --- a/lld/lib/ReaderWriter/ELF/Reader.cpp +++ b/lld/lib/ReaderWriter/ELF/Reader.cpp @@ -53,9 +53,9 @@ struct DynamicFileCreateELFTraits { typedef llvm::ErrorOr> result_type; template - static result_type create(const lld::ELFLinkingContext &ti, + static result_type create(const lld::ELFLinkingContext &ctx, std::unique_ptr mb) { - return lld::elf::DynamicFile::create(ti, std::move(mb)); + return lld::elf::DynamicFile::create(ctx, std::move(mb)); } }; @@ -63,11 +63,11 @@ struct ELFFileCreateELFTraits { typedef std::unique_ptr result_type; template - static result_type create(const lld::ELFLinkingContext &ti, + static result_type create(const lld::ELFLinkingContext &ctx, std::unique_ptr mb, lld::error_code &ec) { return std::unique_ptr( - new lld::elf::ELFFile(ti, std::move(mb), ec)); + new lld::elf::ELFFile(ctx, std::move(mb), ec)); } }; } @@ -78,8 +78,8 @@ namespace elf { /// memory buffer for ELF class and bit width class ELFReader : public Reader { public: - ELFReader(const ELFLinkingContext &ti) - : lld::Reader(ti), _elfLinkingContext(ti), _readerArchive(ti, *this) {} + ELFReader(const ELFLinkingContext &ctx) + : lld::Reader(ctx), _elfLinkingContext(ctx), _readerArchive(ctx, *this) {} error_code parseFile(std::unique_ptr &mb, std::vector> &result) const { diff --git a/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp b/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp index f89f3cab7462..27a6beeedb83 100644 --- a/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp +++ b/lld/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp @@ -201,8 +201,8 @@ protected: } public: - GOTPLTPass(const ELFLinkingContext &ti) - : _file(ti), _null(nullptr), _PLT0(nullptr), _got0(nullptr), + GOTPLTPass(const ELFLinkingContext &ctx) + : _file(ctx), _null(nullptr), _PLT0(nullptr), _got0(nullptr), _got1(nullptr) {} /// \brief Do the pass. @@ -280,7 +280,7 @@ protected: /// TLS always assumes module 1 and attempts to remove indirection. class StaticGOTPLTPass LLVM_FINAL : public GOTPLTPass { public: - StaticGOTPLTPass(const elf::X86_64LinkingContext &ti) : GOTPLTPass(ti) {} + StaticGOTPLTPass(const elf::X86_64LinkingContext &ctx) : GOTPLTPass(ctx) {} ErrorOr handlePLT32(const Reference &ref) { // __tls_get_addr is handled elsewhere. @@ -303,7 +303,7 @@ public: class DynamicGOTPLTPass LLVM_FINAL : public GOTPLTPass { public: - DynamicGOTPLTPass(const elf::X86_64LinkingContext &ti) : GOTPLTPass(ti) {} + DynamicGOTPLTPass(const elf::X86_64LinkingContext &ctx) : GOTPLTPass(ctx) {} const PLT0Atom *getPLT0() { if (_PLT0) diff --git a/lld/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h b/lld/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h index e3226c054120..54d86036fd2b 100644 --- a/lld/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h +++ b/lld/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h @@ -117,9 +117,9 @@ private: /// symbols. class UndefinedSymbolFile : public SimpleFile { public: - UndefinedSymbolFile(const LinkingContext &ti) - : SimpleFile(ti, "Linker Internal File") { - for (StringRef symbol : ti.initialUndefinedSymbols()) { + UndefinedSymbolFile(const LinkingContext &ctx) + : SimpleFile(ctx, "Linker Internal File") { + for (StringRef symbol : ctx.initialUndefinedSymbols()) { UndefinedAtom *atom = new (_alloc) coff::COFFUndefinedAtom(*this, symbol); addAtom(*atom); }