Use makeArrayRef(). No functionality change.
llvm-svn: 194721
This commit is contained in:
parent
687915ffff
commit
83ad675dd3
|
@ -19,10 +19,11 @@
|
|||
|
||||
#include "ReferenceKinds.h"
|
||||
|
||||
using llvm::makeArrayRef;
|
||||
|
||||
namespace lld {
|
||||
namespace mach_o {
|
||||
|
||||
|
||||
//
|
||||
// X86_64 Stub Atom created by the stubs pass.
|
||||
//
|
||||
|
@ -49,7 +50,7 @@ public:
|
|||
static const uint8_t instructions[] =
|
||||
{ 0xFF, 0x25, 0x00, 0x00, 0x00, 0x00 }; // jmp *lazyPointer
|
||||
assert(sizeof(instructions) == this->size());
|
||||
return ArrayRef<uint8_t>(instructions, sizeof(instructions));
|
||||
return makeArrayRef(instructions);
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -86,7 +87,7 @@ public:
|
|||
0xFF, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *binder(%rip)
|
||||
0x90 }; // nop
|
||||
assert(sizeof(instructions) == this->size());
|
||||
return ArrayRef<uint8_t>(instructions, sizeof(instructions));
|
||||
return makeArrayRef(instructions);
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -121,7 +122,7 @@ public:
|
|||
{ 0x68, 0x00, 0x00, 0x00, 0x00, // pushq $lazy-info-offset
|
||||
0xE9, 0x00, 0x00, 0x00, 0x00 }; // jmp helperhelper
|
||||
assert(sizeof(instructions) == this->size());
|
||||
return ArrayRef<uint8_t>(instructions, sizeof(instructions));
|
||||
return makeArrayRef(instructions);
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -158,7 +159,7 @@ public:
|
|||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
static const uint8_t bytes[] =
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
return ArrayRef<uint8_t>(bytes, 8);
|
||||
return makeArrayRef(bytes);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -196,7 +197,7 @@ public:
|
|||
virtual ArrayRef<uint8_t> rawContent() const {
|
||||
static const uint8_t bytes[] =
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
return ArrayRef<uint8_t>(bytes, 8);
|
||||
return makeArrayRef(bytes);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue