From c3fbfc79701322bfc2fe6d767e62b42d094abd69 Mon Sep 17 00:00:00 2001 From: Xing GUO Date: Tue, 14 Jul 2020 10:55:34 +0800 Subject: [PATCH] [DWARFYAML] Replace Is64bit with Is64BitAddrSize. NFC. Is64bit is ambiguous. In this patch, we replace it with Is64BitAddrSize to make it clearer. --- include/llvm/ObjectYAML/DWARFYAML.h | 2 +- lib/ObjectYAML/DWARFEmitter.cpp | 4 ++-- lib/ObjectYAML/ELFYAML.cpp | 2 +- lib/ObjectYAML/MachOYAML.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/llvm/ObjectYAML/DWARFYAML.h b/include/llvm/ObjectYAML/DWARFYAML.h index 259152ff5d0..9f62a4a2be5 100644 --- a/include/llvm/ObjectYAML/DWARFYAML.h +++ b/include/llvm/ObjectYAML/DWARFYAML.h @@ -179,7 +179,7 @@ struct AddrTableEntry { struct Data { bool IsLittleEndian; - bool Is64bit; + bool Is64BitAddrSize; std::vector AbbrevDecls; std::vector DebugStrings; std::vector ARanges; diff --git a/lib/ObjectYAML/DWARFEmitter.cpp b/lib/ObjectYAML/DWARFEmitter.cpp index a8b467af7b2..ed3732ba29f 100644 --- a/lib/ObjectYAML/DWARFEmitter.cpp +++ b/lib/ObjectYAML/DWARFEmitter.cpp @@ -168,7 +168,7 @@ Error DWARFYAML::emitDebugRanges(raw_ostream &OS, const DWARFYAML::Data &DI) { if (DebugRanges.AddrSize) AddrSize = *DebugRanges.AddrSize; else - AddrSize = DI.Is64bit ? 8 : 4; + AddrSize = DI.Is64BitAddrSize ? 8 : 4; for (auto Entry : DebugRanges.Entries) { if (Error Err = writeVariableSizedInteger(Entry.LowOffset, AddrSize, OS, DI.IsLittleEndian)) @@ -381,7 +381,7 @@ Error DWARFYAML::emitDebugAddr(raw_ostream &OS, const Data &DI) { if (TableEntry.AddrSize) AddrSize = *TableEntry.AddrSize; else - AddrSize = DI.Is64bit ? 8 : 4; + AddrSize = DI.Is64BitAddrSize ? 8 : 4; uint64_t Length; if (TableEntry.Length) diff --git a/lib/ObjectYAML/ELFYAML.cpp b/lib/ObjectYAML/ELFYAML.cpp index 51ca5dd7262..3de1ae006ce 100644 --- a/lib/ObjectYAML/ELFYAML.cpp +++ b/lib/ObjectYAML/ELFYAML.cpp @@ -1681,7 +1681,7 @@ void MappingTraits::mapping(IO &IO, ELFYAML::Object &Object) { if (Object.DWARF) { Object.DWARF->IsLittleEndian = Object.Header.Data == ELFYAML::ELF_ELFDATA(ELF::ELFDATA2LSB); - Object.DWARF->Is64bit = + Object.DWARF->Is64BitAddrSize = Object.Header.Class == ELFYAML::ELF_ELFCLASS(ELF::ELFCLASS64); } IO.setContext(nullptr); diff --git a/lib/ObjectYAML/MachOYAML.cpp b/lib/ObjectYAML/MachOYAML.cpp index cd9ca76f5d2..86aad023376 100644 --- a/lib/ObjectYAML/MachOYAML.cpp +++ b/lib/ObjectYAML/MachOYAML.cpp @@ -107,8 +107,8 @@ void MappingTraits::mapping(IO &IO, Object.DWARF.IsLittleEndian = Object.IsLittleEndian; IO.mapRequired("FileHeader", Object.Header); - Object.DWARF.Is64bit = Object.Header.magic == MachO::MH_MAGIC_64 || - Object.Header.magic == MachO::MH_CIGAM_64; + Object.DWARF.Is64BitAddrSize = Object.Header.magic == MachO::MH_MAGIC_64 || + Object.Header.magic == MachO::MH_CIGAM_64; IO.mapOptional("LoadCommands", Object.LoadCommands); if(!Object.LinkEdit.isEmpty() || !IO.outputting()) IO.mapOptional("LinkEditData", Object.LinkEdit);