From: George Rimar Date: Wed, 23 Jan 2019 10:52:38 +0000 (+0000) Subject: [llvm-objdump] - Move variable. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=482634dcda5798e96b24d8cc129725cdd4f39b7b;p=llvm [llvm-objdump] - Move variable. NFC. It was too far from the place where it is used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351942 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index fe873c00913..7d9f6161db1 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/tools/llvm-objdump/llvm-objdump.cpp @@ -890,9 +890,6 @@ static void disassembleObject(const Target *TheTarget, const ObjectFile *Obj, const MCInstrAnalysis *MIA, MCInstPrinter *IP, const MCSubtargetInfo *STI, PrettyPrinter &PIP, SourcePrinter &SP, bool InlineRelocs) { - StringRef Fmt = Obj->getBytesInAddress() > 4 ? "\t\t%016" PRIx64 ": " - : "\t\t\t%08" PRIx64 ": "; - std::map> RelocMap; if (InlineRelocs) RelocMap = getRelocsMap(*Obj); @@ -1338,7 +1335,10 @@ static void disassembleObject(const Target *TheTarget, const ObjectFile *Obj, outs() << "\n"; // Hexagon does this in pretty printer - if (Obj->getArch() != Triple::hexagon) + if (Obj->getArch() != Triple::hexagon) { + StringRef Fmt = Obj->getBytesInAddress() > 4 ? "\t\t%016" PRIx64 ": " + : "\t\t\t%08" PRIx64 + ": "; // Print relocation for instruction. while (RelCur != RelEnd) { uint64_t Addr = RelCur->getOffset(); @@ -1360,6 +1360,7 @@ static void disassembleObject(const Target *TheTarget, const ObjectFile *Obj, << Val << "\n"; ++RelCur; } + } } } }