Skip to content

Commit 506c0fa

Browse files
[NFC] Rename variable to better document usage. (#71973)
Change variable DisassembleAsData to DisassembleAsELFData so that its name better matches its usage.
1 parent f0ad2e9 commit 506c0fa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/tools/llvm-objdump/llvm-objdump.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,19 +1780,19 @@ disassembleObject(ObjectFile &Obj, const ObjectFile &DbgObj,
17801780
// inside functions, for which STT_FUNC would be inaccurate.
17811781
//
17821782
// So here, we spot whether there's any non-data symbol present at all,
1783-
// and only set the DisassembleAsData flag if there isn't. Also, we use
1783+
// and only set the DisassembleAsELFData flag if there isn't. Also, we use
17841784
// this distinction to inform the decision of which symbol to print at
17851785
// the head of the section, so that if we're printing code, we print a
17861786
// code-related symbol name to go with it.
1787-
bool DisassembleAsData = false;
1787+
bool DisassembleAsELFData = false;
17881788
size_t DisplaySymIndex = SymbolsHere.size() - 1;
17891789
if (Obj.isELF() && !DisassembleAll && Section.isText()) {
1790-
DisassembleAsData = true; // unless we find a code symbol below
1790+
DisassembleAsELFData = true; // unless we find a code symbol below
17911791

17921792
for (size_t i = 0; i < SymbolsHere.size(); ++i) {
17931793
uint8_t SymTy = SymbolsHere[i].Type;
17941794
if (SymTy != ELF::STT_OBJECT && SymTy != ELF::STT_COMMON) {
1795-
DisassembleAsData = false;
1795+
DisassembleAsELFData = false;
17961796
DisplaySymIndex = i;
17971797
}
17981798
}
@@ -1943,7 +1943,7 @@ disassembleObject(ObjectFile &Obj, const ObjectFile &DbgObj,
19431943
if (SectionAddr < StartAddress)
19441944
Index = std::max<uint64_t>(Index, StartAddress - SectionAddr);
19451945

1946-
if (DisassembleAsData) {
1946+
if (DisassembleAsELFData) {
19471947
dumpELFData(SectionAddr, Index, End, Bytes);
19481948
Index = End;
19491949
continue;

0 commit comments

Comments
 (0)