Rename ti -> ctx.

This should have been done in r187823 when I renamed LinkingContext
from TargetInfo. I missed a few files.

llvm-svn: 189298
This commit is contained in:
Rui Ueyama 2013-08-27 00:04:42 +00:00
parent a44362e4e9
commit 352e7308c0
8 changed files with 25 additions and 24 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -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;

View File

@ -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<DefinedAtom>(&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; }

View File

@ -25,11 +25,11 @@ namespace elf {
template <class ELFT> class DynamicFile LLVM_FINAL : public SharedLibraryFile {
public:
static ErrorOr<std::unique_ptr<DynamicFile> >
create(const ELFLinkingContext &ti, std::unique_ptr<llvm::MemoryBuffer> mb) {
create(const ELFLinkingContext &ctx, std::unique_ptr<llvm::MemoryBuffer> mb) {
std::unique_ptr<DynamicFile> 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<ELFT>(mb.release(), ec));

View File

@ -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<DynamicGOTPLTPass> {
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";

View File

@ -53,9 +53,9 @@ struct DynamicFileCreateELFTraits {
typedef llvm::ErrorOr<std::unique_ptr<lld::SharedLibraryFile>> result_type;
template <class ELFT>
static result_type create(const lld::ELFLinkingContext &ti,
static result_type create(const lld::ELFLinkingContext &ctx,
std::unique_ptr<llvm::MemoryBuffer> mb) {
return lld::elf::DynamicFile<ELFT>::create(ti, std::move(mb));
return lld::elf::DynamicFile<ELFT>::create(ctx, std::move(mb));
}
};
@ -63,11 +63,11 @@ struct ELFFileCreateELFTraits {
typedef std::unique_ptr<lld::File> result_type;
template <class ELFT>
static result_type create(const lld::ELFLinkingContext &ti,
static result_type create(const lld::ELFLinkingContext &ctx,
std::unique_ptr<llvm::MemoryBuffer> mb,
lld::error_code &ec) {
return std::unique_ptr<lld::File>(
new lld::elf::ELFFile<ELFT>(ti, std::move(mb), ec));
new lld::elf::ELFFile<ELFT>(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<MemoryBuffer> &mb,
std::vector<std::unique_ptr<File>> &result) const {

View File

@ -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<StaticGOTPLTPass> {
public:
StaticGOTPLTPass(const elf::X86_64LinkingContext &ti) : GOTPLTPass(ti) {}
StaticGOTPLTPass(const elf::X86_64LinkingContext &ctx) : GOTPLTPass(ctx) {}
ErrorOr<void> handlePLT32(const Reference &ref) {
// __tls_get_addr is handled elsewhere.
@ -303,7 +303,7 @@ public:
class DynamicGOTPLTPass LLVM_FINAL : public GOTPLTPass<DynamicGOTPLTPass> {
public:
DynamicGOTPLTPass(const elf::X86_64LinkingContext &ti) : GOTPLTPass(ti) {}
DynamicGOTPLTPass(const elf::X86_64LinkingContext &ctx) : GOTPLTPass(ctx) {}
const PLT0Atom *getPLT0() {
if (_PLT0)

View File

@ -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);
}