summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump/MachODump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-objdump/MachODump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/MachODump.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp
index dc60ee1f0c6..b2c52869501 100644
--- a/llvm/tools/llvm-objdump/MachODump.cpp
+++ b/llvm/tools/llvm-objdump/MachODump.cpp
@@ -7275,8 +7275,7 @@ static void DisassembleMachO(StringRef Filename, MachOObjectFile *MachOOF,
StringRef BytesStr;
Sections[SectIdx].getContents(BytesStr);
- ArrayRef<uint8_t> Bytes(reinterpret_cast<const uint8_t *>(BytesStr.data()),
- BytesStr.size());
+ ArrayRef<uint8_t> Bytes = arrayRefFromStringRef(BytesStr);
uint64_t SectAddress = Sections[SectIdx].getAddress();
bool symbolTableWorked = false;
OpenPOWER on IntegriCloud