[PATCH] D73773: [DebugInfo] Remove an unused method DWARFUnit::getDWARF5HeaderSize(). NFC.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 03:35:38 PST 2020


ikudrin created this revision.
ikudrin added reviewers: dblaikie, probinson, aprantl, sgravani.
ikudrin added projects: LLVM, debug-info.

The method was initially added for `DWARFVerifier::verifyUnitHeader()` but its results were never actually used.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73773

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h


Index: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
===================================================================
--- llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
+++ llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
@@ -371,26 +371,6 @@
     return false;
   }
 
-  /// Return the number of bytes for the header of a unit of
-  /// UnitType type.
-  ///
-  /// This function must be called with a valid unit type which in
-  /// DWARF5 is defined as one of the following six types.
-  static uint32_t getDWARF5HeaderSize(uint8_t UnitType) {
-    switch (UnitType) {
-    case dwarf::DW_UT_compile:
-    case dwarf::DW_UT_partial:
-      return 12;
-    case dwarf::DW_UT_skeleton:
-    case dwarf::DW_UT_split_compile:
-      return 20;
-    case dwarf::DW_UT_type:
-    case dwarf::DW_UT_split_type:
-      return 24;
-    }
-    llvm_unreachable("Invalid UnitType.");
-  }
-
   llvm::Optional<object::SectionedAddress> getBaseAddress();
 
   DWARFDie getUnitDIE(bool ExtractUnitDIEOnly = true) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73773.241673.patch
Type: text/x-patch
Size: 1003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200131/67b5d61c/attachment.bin>


More information about the llvm-commits mailing list