OSDN Git Service

[llvm-objdump] Fix MC/ARM/arm-macho-calls.s
authorFangrui Song <maskray@google.com>
Mon, 8 Apr 2019 01:22:38 +0000 (01:22 +0000)
committerFangrui Song <maskray@google.com>
Mon, 8 Apr 2019 01:22:38 +0000 (01:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357880 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-objdump/llvm-objdump.cpp

index 45ef68e..2d8585c 100644 (file)
@@ -1235,7 +1235,6 @@ static void disassembleObject(const Target *TheTarget, const ObjectFile *Obj,
       bool CheckARMELFData = isArmElf(Obj) &&
                              std::get<2>(Symbols[SI]) != ELF::STT_OBJECT &&
                              !DisassembleAll;
-      MCInst Inst;
       while (Index < End) {
         // AArch64 ELF binaries can interleave data and text in the same
         // section. We rely on the markers introduced to understand what we
@@ -1268,7 +1267,7 @@ static void disassembleObject(const Target *TheTarget, const ObjectFile *Obj,
 
         // Disassemble a real instruction or a data when disassemble all is
         // provided
-        Inst.clear();
+        MCInst Inst;
         bool Disassembled = DisAsm->getInstruction(
             Inst, Size, Bytes.slice(Index), SectionAddr + Index, DebugOut,
             CommentStream);