Make getCompileUnitForAddress public.
authorSterling Augustine <saugustine@google.com>
Tue, 28 Apr 2020 22:19:58 +0000 (15:19 -0700)
committerSterling Augustine <saugustine@google.com>
Tue, 28 Apr 2020 23:51:23 +0000 (16:51 -0700)
Summary:
Certain dwarf information (like the compilation directory), are only
accessible from the compile unit. Make it available for use.

Subscribers: aprantl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79048

llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h

index c448c5f..e58a46b 100644 (file)
@@ -394,16 +394,17 @@ public:
     return getDWARFObj().getFile()->getArch();
   }
 
-private:
-  /// Parse a macro[.dwo] or macinfo[.dwo] section.
-  std::unique_ptr<DWARFDebugMacro>
-  parseMacroOrMacinfo(MacroSecType SectionType);
-
   /// Return the compile unit which contains instruction with provided
   /// address.
   /// TODO: change input parameter from "uint64_t Address"
   ///       into "SectionedAddress Address"
   DWARFCompileUnit *getCompileUnitForAddress(uint64_t Address);
+
+private:
+  /// Parse a macro[.dwo] or macinfo[.dwo] section.
+  std::unique_ptr<DWARFDebugMacro>
+  parseMacroOrMacinfo(MacroSecType SectionType);
+
   void addLocalsForDie(DWARFCompileUnit *CU, DWARFDie Subprogram, DWARFDie Die,
                        std::vector<DILocal> &Result);
 };