Remove makeArrayRef() calls.
Because ArrayRef has implicit conversion from C arrays, we don't need makeArrayRef. llvm-svn: 196475
This commit is contained in:
parent
50aa21aedd
commit
7b4721048c
|
@ -46,7 +46,7 @@ public:
|
|||
_createManifest(true), _embedManifest(false), _manifestId(1),
|
||||
_manifestLevel("'asInvoker'"), _manifestUiAccess("'false'"),
|
||||
_imageType(ImageType::IMAGE_EXE),
|
||||
_dosStub(llvm::makeArrayRef(DEFAULT_DOS_STUB)) {
|
||||
_dosStub(DEFAULT_DOS_STUB) {
|
||||
setDeadStripping(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,6 @@ using namespace lld;
|
|||
using namespace elf;
|
||||
using namespace llvm::ELF;
|
||||
|
||||
using llvm::makeArrayRef;
|
||||
|
||||
HexagonTargetHandler::HexagonTargetHandler(HexagonLinkingContext &context)
|
||||
: DefaultTargetHandler(context), _targetLayout(context),
|
||||
_relocationHandler(context, *this, _targetLayout),
|
||||
|
@ -55,7 +53,7 @@ public:
|
|||
HexagonGOTAtom(const File &f) : GOTAtom(f, ".got") {}
|
||||
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
return makeArrayRef(hexagonGotAtomContent);
|
||||
return hexagonGotAtomContent;
|
||||
}
|
||||
|
||||
virtual Alignment alignment() const { return Alignment(2); }
|
||||
|
@ -66,7 +64,7 @@ public:
|
|||
HexagonGOTPLTAtom(const File &f) : GOTAtom(f, ".got.plt") {}
|
||||
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
return makeArrayRef(hexagonGotPltAtomContent);
|
||||
return hexagonGotPltAtomContent;
|
||||
}
|
||||
|
||||
virtual Alignment alignment() const { return Alignment(2); }
|
||||
|
@ -77,7 +75,7 @@ public:
|
|||
HexagonGOTPLT0Atom(const File &f) : GOTAtom(f, ".got.plt") {}
|
||||
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
return makeArrayRef(hexagonGotPlt0AtomContent);
|
||||
return hexagonGotPlt0AtomContent;
|
||||
}
|
||||
|
||||
virtual Alignment alignment() const { return Alignment(3); }
|
||||
|
@ -92,7 +90,7 @@ public:
|
|||
}
|
||||
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
return makeArrayRef(hexagonPlt0AtomContent);
|
||||
return hexagonPlt0AtomContent;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -102,7 +100,7 @@ public:
|
|||
HexagonPLTAtom(const File &f, StringRef secName) : PLTAtom(f, secName) {}
|
||||
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
return makeArrayRef(hexagonPltAtomContent);
|
||||
return hexagonPltAtomContent;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
using namespace lld;
|
||||
using namespace lld::elf;
|
||||
|
||||
using llvm::makeArrayRef;
|
||||
|
||||
namespace {
|
||||
using namespace llvm::ELF;
|
||||
|
||||
|
@ -39,7 +37,7 @@ public:
|
|||
#endif
|
||||
}
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
return makeArrayRef(x86_64InitFiniAtomContent);
|
||||
return x86_64InitFiniAtomContent;
|
||||
}
|
||||
virtual Alignment alignment() const { return Alignment(3); }
|
||||
};
|
||||
|
@ -53,8 +51,9 @@ public:
|
|||
_name += function;
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
return makeArrayRef(x86_64InitFiniAtomContent);
|
||||
return x86_64InitFiniAtomContent;
|
||||
}
|
||||
|
||||
virtual Alignment alignment() const { return Alignment(3); }
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
|
||||
#include "ReferenceKinds.h"
|
||||
|
||||
using llvm::makeArrayRef;
|
||||
|
||||
namespace lld {
|
||||
namespace mach_o {
|
||||
|
||||
|
@ -50,7 +48,7 @@ public:
|
|||
static const uint8_t instructions[] =
|
||||
{ 0xFF, 0x25, 0x00, 0x00, 0x00, 0x00 }; // jmp *lazyPointer
|
||||
assert(sizeof(instructions) == this->size());
|
||||
return makeArrayRef(instructions);
|
||||
return instructions;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -85,7 +83,7 @@ public:
|
|||
0xFF, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *_fast_lazy_bind
|
||||
0x90 }; // nop
|
||||
assert(sizeof(instructions) == this->size());
|
||||
return makeArrayRef(instructions);
|
||||
return instructions;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -118,7 +116,7 @@ public:
|
|||
{ 0x68, 0x00, 0x00, 0x00, 0x00, // pushq $lazy-info-offset
|
||||
0xE9, 0x00, 0x00, 0x00, 0x00 }; // jmp helperhelper
|
||||
assert(sizeof(instructions) == this->size());
|
||||
return makeArrayRef(instructions);
|
||||
return instructions;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -152,7 +150,7 @@ public:
|
|||
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
static const uint8_t bytes[] = { 0x00, 0x00, 0x00, 0x00 };
|
||||
return makeArrayRef(bytes);
|
||||
return bytes;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -187,8 +185,8 @@ public:
|
|||
}
|
||||
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
static const uint8_t bytes[] = { 0x00, 0x00, 0x00, 0x0 };
|
||||
return makeArrayRef(bytes);
|
||||
static const uint8_t bytes[] = { 0x00, 0x00, 0x00, 0x00 };
|
||||
return bytes;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
|
||||
#include "ReferenceKinds.h"
|
||||
|
||||
using llvm::makeArrayRef;
|
||||
|
||||
namespace lld {
|
||||
namespace mach_o {
|
||||
|
||||
|
@ -47,10 +45,9 @@ public:
|
|||
}
|
||||
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
static const uint8_t instructions[] =
|
||||
{ 0xFF, 0x25, 0x00, 0x00, 0x00, 0x00 }; // jmp *lazyPointer
|
||||
static const uint8_t instructions[6] = { 0xFF, 0x25 }; // jmp *lazyPointer
|
||||
assert(sizeof(instructions) == this->size());
|
||||
return makeArrayRef(instructions);
|
||||
return instructions;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -85,7 +82,7 @@ public:
|
|||
0xFF, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *binder(%rip)
|
||||
0x90 }; // nop
|
||||
assert(sizeof(instructions) == this->size());
|
||||
return makeArrayRef(instructions);
|
||||
return instructions;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -117,7 +114,7 @@ public:
|
|||
{ 0x68, 0x00, 0x00, 0x00, 0x00, // pushq $lazy-info-offset
|
||||
0xE9, 0x00, 0x00, 0x00, 0x00 }; // jmp helperhelper
|
||||
assert(sizeof(instructions) == this->size());
|
||||
return makeArrayRef(instructions);
|
||||
return instructions;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -150,9 +147,8 @@ public:
|
|||
}
|
||||
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
static const uint8_t bytes[] =
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
return makeArrayRef(bytes);
|
||||
static const uint8_t bytes[8] = {};
|
||||
return bytes;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -186,9 +182,8 @@ public:
|
|||
}
|
||||
|
||||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
static const uint8_t bytes[] =
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
return makeArrayRef(bytes);
|
||||
static const uint8_t bytes[8] = {};
|
||||
return bytes;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue