diff options
author | stephenpeckham <118857872+stephenpeckham@users.noreply.github.com> | 2023-11-15 12:48:31 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 12:48:31 -0600 |
commit | 506c0fa0b003bb003294200baf884bb8876b5f83 (patch) | |
tree | cc7b9baf0dd88507fea648c2e9629469e0645029 /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | f0ad2e9fda5f78149198f67461e417d101318df5 (diff) | |
download | llvm-506c0fa0b003bb003294200baf884bb8876b5f83.zip llvm-506c0fa0b003bb003294200baf884bb8876b5f83.tar.gz llvm-506c0fa0b003bb003294200baf884bb8876b5f83.tar.bz2 |
[NFC] Rename variable to better document usage. (#71973)
Change variable DisassembleAsData to DisassembleAsELFData so that its
name better matches its usage.
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r-- | llvm/tools/llvm-objdump/llvm-objdump.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index c3bcfd2..a828f3f 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -1780,19 +1780,19 @@ disassembleObject(ObjectFile &Obj, const ObjectFile &DbgObj, // inside functions, for which STT_FUNC would be inaccurate. // // So here, we spot whether there's any non-data symbol present at all, - // and only set the DisassembleAsData flag if there isn't. Also, we use + // and only set the DisassembleAsELFData flag if there isn't. Also, we use // this distinction to inform the decision of which symbol to print at // the head of the section, so that if we're printing code, we print a // code-related symbol name to go with it. - bool DisassembleAsData = false; + bool DisassembleAsELFData = false; size_t DisplaySymIndex = SymbolsHere.size() - 1; if (Obj.isELF() && !DisassembleAll && Section.isText()) { - DisassembleAsData = true; // unless we find a code symbol below + DisassembleAsELFData = true; // unless we find a code symbol below for (size_t i = 0; i < SymbolsHere.size(); ++i) { uint8_t SymTy = SymbolsHere[i].Type; if (SymTy != ELF::STT_OBJECT && SymTy != ELF::STT_COMMON) { - DisassembleAsData = false; + DisassembleAsELFData = false; DisplaySymIndex = i; } } @@ -1943,7 +1943,7 @@ disassembleObject(ObjectFile &Obj, const ObjectFile &DbgObj, if (SectionAddr < StartAddress) Index = std::max<uint64_t>(Index, StartAddress - SectionAddr); - if (DisassembleAsData) { + if (DisassembleAsELFData) { dumpELFData(SectionAddr, Index, End, Bytes); Index = End; continue; |