From 6a0746a92f0764f7af1968c84b141ccbe752919c Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 7 Apr 2019 03:58:42 +0000 Subject: Change some StringRef::data() reinterpret_cast to bytes_begin() or arrayRefFromStringRef() llvm-svn: 357852 --- llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld') diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp index 642c381aaf9..28c8a69939e 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp @@ -666,9 +666,7 @@ private: bool decodeInst(StringRef Symbol, MCInst &Inst, uint64_t &Size) const { MCDisassembler *Dis = Checker.Disassembler; StringRef SectionMem = Checker.getSubsectionStartingAt(Symbol); - ArrayRef SectionBytes( - reinterpret_cast(SectionMem.data()), - SectionMem.size()); + ArrayRef SectionBytes(SectionMem.bytes_begin(), SectionMem.size()); MCDisassembler::DecodeStatus S = Dis->getInstruction(Inst, Size, SectionBytes, 0, nulls(), nulls()); -- cgit v1.2.3