mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
[Objdump] DumpBytes of uint8_t from ArrayRef<uint8_t> instead of char from StringRef. Removing reinterpret_casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -194,7 +194,7 @@ static const Target *getTarget(const ObjectFile *Obj = nullptr) {
|
||||
return TheTarget;
|
||||
}
|
||||
|
||||
void llvm::DumpBytes(StringRef bytes) {
|
||||
void llvm::DumpBytes(ArrayRef<uint8_t> bytes) {
|
||||
static const char hex_rep[] = "0123456789abcdef";
|
||||
SmallString<64> output;
|
||||
|
||||
@ -399,8 +399,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
||||
outs() << format("%8" PRIx64 ":", SectionAddr + Index);
|
||||
if (!NoShowRawInsn) {
|
||||
outs() << "\t";
|
||||
DumpBytes(StringRef(
|
||||
reinterpret_cast<const char *>(Bytes.data()) + Index, Size));
|
||||
DumpBytes(ArrayRef<uint8_t>(Bytes.data() + Index, Size));
|
||||
}
|
||||
IP->printInst(&Inst, outs(), "");
|
||||
outs() << CommentStream.str();
|
||||
|
Reference in New Issue
Block a user