OSDN Git Service

Try to fix MSan bootstrap bot: make ARM64Disassembler::getInstruction() always initia...
authorAlexey Samsonov <samsonov@google.com>
Mon, 31 Mar 2014 07:59:33 +0000 (07:59 +0000)
committerAlexey Samsonov <samsonov@google.com>
Mon, 31 Mar 2014 07:59:33 +0000 (07:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205171 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp

index 800eaae..1af8b2f 100644 (file)
@@ -195,9 +195,11 @@ DecodeStatus ARM64Disassembler::getInstruction(MCInst &MI, uint64_t &Size,
 
   uint8_t bytes[4];
 
+  Size = 0;
   // We want to read exactly 4 bytes of data.
   if (Region.readBytes(Address, 4, (uint8_t *)bytes) == -1)
     return Fail;
+  Size = 4;
 
   // Encoded as a small-endian 32-bit word in the stream.
   uint32_t insn =
@@ -209,8 +211,6 @@ DecodeStatus ARM64Disassembler::getInstruction(MCInst &MI, uint64_t &Size,
   if (!result)
     return Fail;
 
-  Size = 4;
-
   return Success;
 }