[llvm] 830a7c2 - [DWARFYAML] Replace Is64bit with Is64BitAddrSize. NFC.
Xing GUO via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 19:59:36 PDT 2020
Author: Xing GUO
Date: 2020-07-14T10:58:35+08:00
New Revision: 830a7c2ad41d147c536f1b20061fe94ca978f079
URL: https://github.com/llvm/llvm-project/commit/830a7c2ad41d147c536f1b20061fe94ca978f079
DIFF: https://github.com/llvm/llvm-project/commit/830a7c2ad41d147c536f1b20061fe94ca978f079.diff
LOG: [DWARFYAML] Replace Is64bit with Is64BitAddrSize. NFC.
Is64bit is ambiguous. In this patch, we replace it with Is64BitAddrSize
to make it clearer.
Added:
Modified:
llvm/include/llvm/ObjectYAML/DWARFYAML.h
llvm/lib/ObjectYAML/DWARFEmitter.cpp
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/lib/ObjectYAML/MachOYAML.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/ObjectYAML/DWARFYAML.h b/llvm/include/llvm/ObjectYAML/DWARFYAML.h
index 259152ff5d03..9f62a4a2be57 100644
--- a/llvm/include/llvm/ObjectYAML/DWARFYAML.h
+++ b/llvm/include/llvm/ObjectYAML/DWARFYAML.h
@@ -179,7 +179,7 @@ struct AddrTableEntry {
struct Data {
bool IsLittleEndian;
- bool Is64bit;
+ bool Is64BitAddrSize;
std::vector<Abbrev> AbbrevDecls;
std::vector<StringRef> DebugStrings;
std::vector<ARange> ARanges;
diff --git a/llvm/lib/ObjectYAML/DWARFEmitter.cpp b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
index a8b467af7b2d..ed3732ba29f6 100644
--- a/llvm/lib/ObjectYAML/DWARFEmitter.cpp
+++ b/llvm/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/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp
index 51ca5dd72621..3de1ae006ce4 100644
--- a/llvm/lib/ObjectYAML/ELFYAML.cpp
+++ b/llvm/lib/ObjectYAML/ELFYAML.cpp
@@ -1681,7 +1681,7 @@ void MappingTraits<ELFYAML::Object>::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/llvm/lib/ObjectYAML/MachOYAML.cpp b/llvm/lib/ObjectYAML/MachOYAML.cpp
index cd9ca76f5d2f..86aad0233767 100644
--- a/llvm/lib/ObjectYAML/MachOYAML.cpp
+++ b/llvm/lib/ObjectYAML/MachOYAML.cpp
@@ -107,8 +107,8 @@ void MappingTraits<MachOYAML::Object>::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);
More information about the llvm-commits
mailing list