summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-04-07 03:58:42 +0000
committerFangrui Song <maskray@google.com>2019-04-07 03:58:42 +0000
commit6a0746a92f0764f7af1968c84b141ccbe752919c (patch)
tree0ee2b9c51b91d60ec561bc3a6ba11e7a8937c29c /llvm/lib/ExecutionEngine/RuntimeDyld
parentfca07890a9918e9814a7c3d6a39ea3a91789b546 (diff)
downloadbcm5719-llvm-6a0746a92f0764f7af1968c84b141ccbe752919c.tar.gz
bcm5719-llvm-6a0746a92f0764f7af1968c84b141ccbe752919c.zip
Change some StringRef::data() reinterpret_cast to bytes_begin() or arrayRefFromStringRef()
llvm-svn: 357852
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp4
1 files changed, 1 insertions, 3 deletions
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<uint8_t> SectionBytes(
- reinterpret_cast<const uint8_t *>(SectionMem.data()),
- SectionMem.size());
+ ArrayRef<uint8_t> SectionBytes(SectionMem.bytes_begin(), SectionMem.size());
MCDisassembler::DecodeStatus S =
Dis->getInstruction(Inst, Size, SectionBytes, 0, nulls(), nulls());
OpenPOWER on IntegriCloud