[llvm] 93bc571 - [DWARFYAML][debug_gnu_*] 'Descriptor' field should be 1-byte. NFC.

Xing GUO via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 17:17:06 PDT 2020


Author: Xing GUO
Date: 2020-06-25T08:21:13+08:00
New Revision: 93bc571d472dddc188b0d169af38dc3eff128bb6

URL: https://github.com/llvm/llvm-project/commit/93bc571d472dddc188b0d169af38dc3eff128bb6
DIFF: https://github.com/llvm/llvm-project/commit/93bc571d472dddc188b0d169af38dc3eff128bb6.diff

LOG: [DWARFYAML][debug_gnu_*] 'Descriptor' field should be 1-byte. NFC.

The 'Descriptor' field of .debug_gnu_pubnames and .debug_gnu_pubtypes
section should be 1-byte rather than 4-byte. This patch helps resolve
this issue.

Added: 
    

Modified: 
    llvm/lib/ObjectYAML/DWARFEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ObjectYAML/DWARFEmitter.cpp b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
index f1b46d7b3f87..4f8fa7397136 100644
--- a/llvm/lib/ObjectYAML/DWARFEmitter.cpp
+++ b/llvm/lib/ObjectYAML/DWARFEmitter.cpp
@@ -191,7 +191,7 @@ Error DWARFYAML::emitPubSection(raw_ostream &OS,
   for (auto Entry : Sect.Entries) {
     writeInteger((uint32_t)Entry.DieOffset, OS, IsLittleEndian);
     if (Sect.IsGNUStyle)
-      writeInteger((uint32_t)Entry.Descriptor, OS, IsLittleEndian);
+      writeInteger((uint8_t)Entry.Descriptor, OS, IsLittleEndian);
     OS.write(Entry.Name.data(), Entry.Name.size());
     OS.write('\0');
   }


        


More information about the llvm-commits mailing list