mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-25 14:50:26 +00:00
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:
parent
a44362e4e9
commit
352e7308c0
Binary file not shown.
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
@ -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;
|
||||
|
@ -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; }
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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";
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user