Fixing a -Wcast-qual warning; NFC.
authorAaron Ballman <aaron@aaronballman.com>
Wed, 12 Nov 2014 13:55:27 +0000 (13:55 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 12 Nov 2014 13:55:27 +0000 (13:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221781 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp

index 692b2f2f6aa15544bf935e4a650dbc7d9bc1384d..509a06445e309f2d1604e4caa2d2b2dc87b1e5be 100644 (file)
@@ -667,8 +667,9 @@ private:
   bool decodeInst(StringRef Symbol, MCInst &Inst, uint64_t &Size) const {
     MCDisassembler *Dis = Checker.Disassembler;
     StringRef SectionMem = Checker.getSubsectionStartingAt(Symbol);
-    ArrayRef<uint8_t> SectionBytes((uint8_t *)SectionMem.begin(),
-                                   SectionMem.size());
+    ArrayRef<uint8_t> SectionBytes(
+        reinterpret_cast<const uint8_t *>(SectionMem.begin()),
+        SectionMem.size());
 
     MCDisassembler::DecodeStatus S =
         Dis->getInstruction(Inst, Size, SectionBytes, 0, nulls(), nulls());