[ObjectYAML][DWARF] Take into account other debug sections in DWARFYAML::Data::isEmpty().
authorXing GUO <higuoxing@gmail.com>
Sun, 17 May 2020 14:48:40 +0000 (22:48 +0800)
committerXing GUO <higuoxing@gmail.com>
Sun, 17 May 2020 14:53:27 +0000 (22:53 +0800)
llvm/lib/ObjectYAML/DWARFYAML.cpp

index cff8c2b..31c469f 100644 (file)
 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 {