[llvm] 42011fb - [ObjectYAML][DWARF] Take into account other debug sections in DWARFYAML::Data::isEmpty().

Xing GUO via llvm-commits llvm-commits at lists.llvm.org
Sun May 17 07:56:09 PDT 2020


Author: Xing GUO
Date: 2020-05-17T22:53:27+08:00
New Revision: 42011fb1c881fc5902935044ab92b05ac827e8ec

URL: https://github.com/llvm/llvm-project/commit/42011fb1c881fc5902935044ab92b05ac827e8ec
DIFF: https://github.com/llvm/llvm-project/commit/42011fb1c881fc5902935044ab92b05ac827e8ec.diff

LOG: [ObjectYAML][DWARF] Take into account other debug sections in DWARFYAML::Data::isEmpty().

Added: 
    

Modified: 
    llvm/lib/ObjectYAML/DWARFYAML.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ObjectYAML/DWARFYAML.cpp b/llvm/lib/ObjectYAML/DWARFYAML.cpp
index cff8c2b3359b..31c469f88004 100644
--- a/llvm/lib/ObjectYAML/DWARFYAML.cpp
+++ b/llvm/lib/ObjectYAML/DWARFYAML.cpp
@@ -16,7 +16,11 @@
 namespace llvm {
 
 bool DWARFYAML::Data::isEmpty() const {
-  return 0 == DebugStrings.size() + AbbrevDecls.size();
+  return 0 == DebugStrings.size() + AbbrevDecls.size() + ARanges.size() +
+                  DebugRanges.size() + PubNames.Entries.size() +
+                  PubTypes.Entries.size() + GNUPubNames.Entries.size() +
+                  GNUPubTypes.Entries.size() + CompileUnits.size() +
+                  DebugLines.size();
 }
 
 namespace yaml {


        


More information about the llvm-commits mailing list