[PATCH] D75037: [DebugInfo]: Refactored Macinfo section consumption part to allow future macro section dumping.

Sourabh Singh Tomar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 18:34:03 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG226bddce458b: [DebugInfo]: Refactored Macinfo section consumption part to allow future macro… (authored by SouraVX).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75037/new/

https://reviews.llvm.org/D75037

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp


Index: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
===================================================================
--- llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -442,12 +442,12 @@
 
   if (shouldDump(Explicit, ".debug_macinfo", DIDT_ID_DebugMacro,
                  DObj->getMacinfoSection())) {
-    getDebugMacro()->dump(OS);
+    getDebugMacinfo()->dump(OS);
   }
 
   if (shouldDump(Explicit, ".debug_macinfo.dwo", DIDT_ID_DebugMacro,
                  DObj->getMacinfoDWOSection())) {
-    getDebugMacroDWO()->dump(OS);
+    getDebugMacinfoDWO()->dump(OS);
   }
 
   if (shouldDump(Explicit, ".debug_aranges", DIDT_ID_DebugAranges,
@@ -808,25 +808,25 @@
   return DebugFrame.get();
 }
 
-const DWARFDebugMacro *DWARFContext::getDebugMacroDWO() {
-  if (MacroDWO)
-    return MacroDWO.get();
+const DWARFDebugMacro *DWARFContext::getDebugMacinfoDWO() {
+  if (MacinfoDWO)
+    return MacinfoDWO.get();
 
   DataExtractor MacinfoDWOData(DObj->getMacinfoDWOSection(), isLittleEndian(),
                                0);
-  MacroDWO.reset(new DWARFDebugMacro());
-  MacroDWO->parse(MacinfoDWOData);
-  return MacroDWO.get();
+  MacinfoDWO.reset(new DWARFDebugMacro());
+  MacinfoDWO->parse(MacinfoDWOData);
+  return MacinfoDWO.get();
 }
 
-const DWARFDebugMacro *DWARFContext::getDebugMacro() {
-  if (Macro)
-    return Macro.get();
+const DWARFDebugMacro *DWARFContext::getDebugMacinfo() {
+  if (Macinfo)
+    return Macinfo.get();
 
   DataExtractor MacinfoData(DObj->getMacinfoSection(), isLittleEndian(), 0);
-  Macro.reset(new DWARFDebugMacro());
-  Macro->parse(MacinfoData);
-  return Macro.get();
+  Macinfo.reset(new DWARFDebugMacro());
+  Macinfo->parse(MacinfoData);
+  return Macinfo.get();
 }
 
 template <typename T>
Index: llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
===================================================================
--- llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
+++ llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
@@ -66,7 +66,7 @@
   std::unique_ptr<DWARFDebugLine> Line;
   std::unique_ptr<DWARFDebugFrame> DebugFrame;
   std::unique_ptr<DWARFDebugFrame> EHFrame;
-  std::unique_ptr<DWARFDebugMacro> Macro;
+  std::unique_ptr<DWARFDebugMacro> Macinfo;
   std::unique_ptr<DWARFDebugNames> Names;
   std::unique_ptr<AppleAcceleratorTable> AppleNames;
   std::unique_ptr<AppleAcceleratorTable> AppleTypes;
@@ -75,7 +75,7 @@
 
   DWARFUnitVector DWOUnits;
   std::unique_ptr<DWARFDebugAbbrev> AbbrevDWO;
-  std::unique_ptr<DWARFDebugMacro> MacroDWO;
+  std::unique_ptr<DWARFDebugMacro> MacinfoDWO;
 
   /// The maximum DWARF version of all units.
   unsigned MaxVersion = 0;
@@ -273,10 +273,10 @@
   const DWARFDebugFrame *getEHFrame();
 
   /// Get a pointer to the parsed DebugMacro object.
-  const DWARFDebugMacro *getDebugMacro();
+  const DWARFDebugMacro *getDebugMacinfo();
 
-  /// Get a pointer to the parsed DebugMacroDWO object.
-  const DWARFDebugMacro *getDebugMacroDWO();
+  /// Get a pointer to the parsed dwo DebugMacro object.
+  const DWARFDebugMacro *getDebugMacinfoDWO();
 
   /// Get a reference to the parsed accelerator table object.
   const DWARFDebugNames &getDebugNames();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75037.246357.patch
Type: text/x-patch
Size: 3202 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200225/650f8ae9/attachment.bin>


More information about the llvm-commits mailing list