[Lldb-commits] [lldb] r327810 - Move the codebase to use: DWARFCompileUnit -> DWARFUnit

Jan Kratochvil via lldb-commits lldb-commits at lists.llvm.org
Sun Mar 18 13:11:02 PDT 2018


Author: jankratochvil
Date: Sun Mar 18 13:11:02 2018
New Revision: 327810

URL: http://llvm.org/viewvc/llvm-project?rev=327810&view=rev
Log:
Move the codebase to use: DWARFCompileUnit -> DWARFUnit

Now the codebase can use the DWARFUnit superclass. It will make it later
seamlessly work also with DWARFPartialUnit for DWZ.

This patch is only a search-and-replace easily undone, nothing interesting
in it.

Differential revision: https://reviews.llvm.org/D42892

Modified:
    lldb/trunk/include/lldb/Expression/DWARFExpression.h
    lldb/trunk/source/Expression/DWARFExpression.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h

Modified: lldb/trunk/include/lldb/Expression/DWARFExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/DWARFExpression.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/DWARFExpression.h (original)
+++ lldb/trunk/include/lldb/Expression/DWARFExpression.h Sun Mar 18 13:11:02 2018
@@ -18,7 +18,7 @@
 #include "lldb/lldb-private.h"
 #include <functional>
 
-class DWARFCompileUnit;
+class DWARFUnit;
 
 namespace lldb_private {
 
@@ -46,7 +46,7 @@ public:
   //------------------------------------------------------------------
   /// Constructor
   //------------------------------------------------------------------
-  explicit DWARFExpression(DWARFCompileUnit *dwarf_cu);
+  explicit DWARFExpression(DWARFUnit *dwarf_cu);
 
   //------------------------------------------------------------------
   /// Constructor
@@ -62,7 +62,7 @@ public:
   ///     The byte length of the location expression.
   //------------------------------------------------------------------
   DWARFExpression(lldb::ModuleSP module, const DataExtractor &data,
-                  DWARFCompileUnit *dwarf_cu, lldb::offset_t data_offset,
+                  DWARFUnit *dwarf_cu, lldb::offset_t data_offset,
                   lldb::offset_t data_length);
 
   //------------------------------------------------------------------
@@ -332,7 +332,7 @@ public:
   //------------------------------------------------------------------
   static bool Evaluate(ExecutionContext *exe_ctx, RegisterContext *reg_ctx,
                        lldb::ModuleSP opcode_ctx, const DataExtractor &opcodes,
-                       DWARFCompileUnit *dwarf_cu, const lldb::offset_t offset,
+                       DWARFUnit *dwarf_cu, const lldb::offset_t offset,
                        const lldb::offset_t length,
                        const lldb::RegisterKind reg_set,
                        const Value *initial_value_ptr,
@@ -348,7 +348,7 @@ public:
                               lldb::addr_t loclist_base_load_addr,
                               lldb::addr_t address, ABI *abi);
 
-  static size_t LocationListSize(const DWARFCompileUnit *dwarf_cu,
+  static size_t LocationListSize(const DWARFUnit *dwarf_cu,
                                  const DataExtractor &debug_loc_data,
                                  lldb::offset_t offset);
 
@@ -356,7 +356,7 @@ public:
                                    int address_size, int dwarf_ref_size,
                                    bool location_expression);
 
-  static void PrintDWARFLocationList(Stream &s, const DWARFCompileUnit *cu,
+  static void PrintDWARFLocationList(Stream &s, const DWARFUnit *cu,
                                      const DataExtractor &debug_loc_data,
                                      lldb::offset_t offset);
 
@@ -389,7 +389,7 @@ protected:
                    lldb::offset_t &offset, lldb::offset_t &len);
 
   static bool AddressRangeForLocationListEntry(
-      const DWARFCompileUnit *dwarf_cu, const DataExtractor &debug_loc_data,
+      const DWARFUnit *dwarf_cu, const DataExtractor &debug_loc_data,
       lldb::offset_t *offset_ptr, lldb::addr_t &low_pc, lldb::addr_t &high_pc);
 
   bool GetOpAndEndOffsets(StackFrame &frame, lldb::offset_t &op_offset,
@@ -401,7 +401,7 @@ protected:
 
   lldb::ModuleWP m_module_wp; ///< Module which defined this expression.
   DataExtractor m_data; ///< A data extractor capable of reading opcode bytes
-  DWARFCompileUnit *m_dwarf_cu; ///< The DWARF compile unit this expression
+  DWARFUnit *m_dwarf_cu; ///< The DWARF compile unit this expression
                                 ///belongs to. It is used
   ///< to evaluate values indexing into the .debug_addr section (e.g.
   ///< DW_OP_GNU_addr_index, DW_OP_GNU_const_index)

Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Sun Mar 18 13:11:02 2018
@@ -37,13 +37,13 @@
 #include "lldb/Target/StackID.h"
 #include "lldb/Target/Thread.h"
 
-#include "Plugins/SymbolFile/DWARF/DWARFCompileUnit.h"
+#include "Plugins/SymbolFile/DWARF/DWARFUnit.h"
 
 using namespace lldb;
 using namespace lldb_private;
 
 static lldb::addr_t
-ReadAddressFromDebugAddrSection(const DWARFCompileUnit *dwarf_cu,
+ReadAddressFromDebugAddrSection(const DWARFUnit *dwarf_cu,
                                 uint32_t index) {
   uint32_t index_size = dwarf_cu->GetAddressByteSize();
   dw_offset_t addr_base = dwarf_cu->GetAddrBase();
@@ -55,7 +55,7 @@ ReadAddressFromDebugAddrSection(const DW
 //----------------------------------------------------------------------
 // DWARFExpression constructor
 //----------------------------------------------------------------------
-DWARFExpression::DWARFExpression(DWARFCompileUnit *dwarf_cu)
+DWARFExpression::DWARFExpression(DWARFUnit *dwarf_cu)
     : m_module_wp(), m_data(), m_dwarf_cu(dwarf_cu),
       m_reg_kind(eRegisterKindDWARF), m_loclist_slide(LLDB_INVALID_ADDRESS) {}
 
@@ -66,7 +66,7 @@ DWARFExpression::DWARFExpression(const D
 
 DWARFExpression::DWARFExpression(lldb::ModuleSP module_sp,
                                  const DataExtractor &data,
-                                 DWARFCompileUnit *dwarf_cu,
+                                 DWARFUnit *dwarf_cu,
                                  lldb::offset_t data_offset,
                                  lldb::offset_t data_length)
     : m_module_wp(), m_data(data, data_offset, data_length),
@@ -1323,7 +1323,7 @@ bool DWARFExpression::Evaluate(Execution
 bool DWARFExpression::Evaluate(
     ExecutionContext *exe_ctx, RegisterContext *reg_ctx,
     lldb::ModuleSP module_sp, const DataExtractor &opcodes,
-    DWARFCompileUnit *dwarf_cu, const lldb::offset_t opcodes_offset,
+    DWARFUnit *dwarf_cu, const lldb::offset_t opcodes_offset,
     const lldb::offset_t opcodes_length, const lldb::RegisterKind reg_kind,
     const Value *initial_value_ptr, const Value *object_address_ptr,
     Value &result, Status *error_ptr) {
@@ -2984,7 +2984,7 @@ bool DWARFExpression::Evaluate(
   return true; // Return true on success
 }
 
-size_t DWARFExpression::LocationListSize(const DWARFCompileUnit *dwarf_cu,
+size_t DWARFExpression::LocationListSize(const DWARFUnit *dwarf_cu,
                                          const DataExtractor &debug_loc_data,
                                          lldb::offset_t offset) {
   const lldb::offset_t debug_loc_offset = offset;
@@ -3008,7 +3008,7 @@ size_t DWARFExpression::LocationListSize
 }
 
 bool DWARFExpression::AddressRangeForLocationListEntry(
-    const DWARFCompileUnit *dwarf_cu, const DataExtractor &debug_loc_data,
+    const DWARFUnit *dwarf_cu, const DataExtractor &debug_loc_data,
     lldb::offset_t *offset_ptr, lldb::addr_t &low_pc, lldb::addr_t &high_pc) {
   if (!debug_loc_data.ValidOffset(*offset_ptr))
     return false;
@@ -3242,11 +3242,11 @@ bool DWARFExpression::PrintDWARFExpressi
 }
 
 void DWARFExpression::PrintDWARFLocationList(
-    Stream &s, const DWARFCompileUnit *cu, const DataExtractor &debug_loc_data,
+    Stream &s, const DWARFUnit *cu, const DataExtractor &debug_loc_data,
     lldb::offset_t offset) {
   uint64_t start_addr, end_addr;
-  uint32_t addr_size = DWARFCompileUnit::GetAddressByteSize(cu);
-  s.SetAddressByteSize(DWARFCompileUnit::GetAddressByteSize(cu));
+  uint32_t addr_size = DWARFUnit::GetAddressByteSize(cu);
+  s.SetAddressByteSize(DWARFUnit::GetAddressByteSize(cu));
   dw_addr_t base_addr = cu ? cu->GetBaseAddress() : 0;
   while (debug_loc_data.ValidOffset(offset)) {
     start_addr = debug_loc_data.GetMaxU64(&offset, addr_size);

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.cpp Sun Mar 18 13:11:02 2018
@@ -8,7 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "DIERef.h"
-#include "DWARFCompileUnit.h"
+#include "DWARFUnit.h"
 #include "DWARFDebugInfo.h"
 #include "DWARFFormValue.h"
 #include "SymbolFileDWARF.h"
@@ -28,7 +28,7 @@ DIERef::DIERef(lldb::user_id_t uid, Symb
     if (actual_dwarf) {
       DWARFDebugInfo *debug_info = actual_dwarf->DebugInfo();
       if (debug_info) {
-        DWARFCompileUnit *dwarf_cu =
+        DWARFUnit *dwarf_cu =
             debug_info->GetCompileUnitContainingDIEOffset(die_offset);
         if (dwarf_cu) {
           cu_offset = dwarf_cu->GetOffset();
@@ -45,7 +45,7 @@ DIERef::DIERef(lldb::user_id_t uid, Symb
 DIERef::DIERef(const DWARFFormValue &form_value)
     : cu_offset(DW_INVALID_OFFSET), die_offset(DW_INVALID_OFFSET) {
   if (form_value.IsValid()) {
-    const DWARFCompileUnit *dwarf_cu = form_value.GetCompileUnit();
+    const DWARFUnit *dwarf_cu = form_value.GetCompileUnit();
     if (dwarf_cu) {
       if (dwarf_cu->GetBaseObjOffset() != DW_INVALID_OFFSET)
         cu_offset = dwarf_cu->GetBaseObjOffset();

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp Sun Mar 18 13:11:02 2018
@@ -9,7 +9,7 @@
 
 #include "DWARFASTParserJava.h"
 #include "DWARFAttribute.h"
-#include "DWARFCompileUnit.h"
+#include "DWARFUnit.h"
 #include "DWARFDebugInfoEntry.h"
 #include "DWARFDebugInfoEntry.h"
 #include "DWARFDeclContext.h"
@@ -418,7 +418,7 @@ bool DWARFASTParserJava::CompleteTypeFro
 
 void DWARFASTParserJava::ParseChildMembers(const DWARFDIE &parent_die,
                                            CompilerType &compiler_type) {
-  DWARFCompileUnit *dwarf_cu = parent_die.GetCU();
+  DWARFUnit *dwarf_cu = parent_die.GetCU();
   for (DWARFDIE die = parent_die.GetFirstChild(); die.IsValid();
        die = die.GetSibling()) {
     switch (die.Tag()) {

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.cpp Sun Mar 18 13:11:02 2018
@@ -8,7 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "DWARFAttribute.h"
-#include "DWARFCompileUnit.h"
+#include "DWARFUnit.h"
 #include "DWARFDebugInfo.h"
 
 DWARFAttributes::DWARFAttributes() : m_infos() {}
@@ -26,7 +26,7 @@ uint32_t DWARFAttributes::FindAttributeI
   return UINT32_MAX;
 }
 
-void DWARFAttributes::Append(const DWARFCompileUnit *cu,
+void DWARFAttributes::Append(const DWARFUnit *cu,
                              dw_offset_t attr_die_offset, dw_attr_t attr,
                              dw_form_t form) {
   AttributeValue attr_value = {cu, attr_die_offset, {attr, form}};
@@ -48,7 +48,7 @@ bool DWARFAttributes::RemoveAttribute(dw
 
 bool DWARFAttributes::ExtractFormValueAtIndex(
     uint32_t i, DWARFFormValue &form_value) const {
-  const DWARFCompileUnit *cu = CompileUnitAtIndex(i);
+  const DWARFUnit *cu = CompileUnitAtIndex(i);
   form_value.SetCompileUnit(cu);
   form_value.SetForm(FormAtIndex(i));
   lldb::offset_t offset = DIEOffsetAtIndex(i);

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAttribute.h Sun Mar 18 13:11:02 2018
@@ -14,7 +14,7 @@
 #include "llvm/ADT/SmallVector.h"
 #include <vector>
 
-class DWARFCompileUnit;
+class DWARFUnit;
 class DWARFFormValue;
 
 class DWARFAttribute {
@@ -50,9 +50,9 @@ public:
   DWARFAttributes();
   ~DWARFAttributes();
 
-  void Append(const DWARFCompileUnit *cu, dw_offset_t attr_die_offset,
+  void Append(const DWARFUnit *cu, dw_offset_t attr_die_offset,
               dw_attr_t attr, dw_form_t form);
-  const DWARFCompileUnit *CompileUnitAtIndex(uint32_t i) const {
+  const DWARFUnit *CompileUnitAtIndex(uint32_t i) const {
     return m_infos[i].cu;
   }
   dw_offset_t DIEOffsetAtIndex(uint32_t i) const {
@@ -73,7 +73,7 @@ public:
 
 protected:
   struct AttributeValue {
-    const DWARFCompileUnit *cu; // Keep the compile unit with each attribute in
+    const DWARFUnit *cu;        // Keep the compile unit with each attribute in
                                 // case we have DW_FORM_ref_addr values
     dw_offset_t die_offset;
     DWARFAttribute attr;

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Sun Mar 18 13:11:02 2018
@@ -40,9 +40,10 @@ extern int g_verbose;
 DWARFCompileUnit::DWARFCompileUnit(SymbolFileDWARF *dwarf2Data)
     : m_dwarf2Data(dwarf2Data) {}
 
-DWARFCompileUnitSP DWARFCompileUnit::Extract(SymbolFileDWARF *dwarf2Data,
+DWARFUnitSP DWARFCompileUnit::Extract(SymbolFileDWARF *dwarf2Data,
     lldb::offset_t *offset_ptr) {
-  DWARFCompileUnitSP cu_sp(new DWARFCompileUnit(dwarf2Data));
+  // std::make_shared would require the ctor to be public.
+  std::shared_ptr<DWARFCompileUnit> cu_sp(new DWARFCompileUnit(dwarf2Data));
   // Out of memory?
   if (cu_sp.get() == NULL)
     return nullptr;
@@ -249,7 +250,7 @@ size_t DWARFCompileUnit::ExtractDIEsIfNe
   if (!m_dwo_symbol_file)
     return m_die_array.size();
 
-  DWARFCompileUnit *dwo_cu = m_dwo_symbol_file->GetCompileUnit();
+  DWARFUnit *dwo_cu = m_dwo_symbol_file->GetCompileUnit();
   size_t dwo_die_count = dwo_cu->ExtractDIEsIfNeeded(cu_die_only);
   return m_die_array.size() + dwo_die_count -
          1; // We have 2 CU die, but we want to count it only as one
@@ -265,7 +266,7 @@ void DWARFCompileUnit::AddCompileUnitDIE
   if (!dwo_symbol_file)
     return;
 
-  DWARFCompileUnit *dwo_cu = dwo_symbol_file->GetCompileUnit();
+  DWARFUnit *dwo_cu = dwo_symbol_file->GetCompileUnit();
   if (!dwo_cu)
     return; // Can't fetch the compile unit from the dwo file.
 
@@ -466,7 +467,7 @@ const DWARFDebugAranges &DWARFCompileUni
                                           m_func_aranges_ap.get());
 
     if (m_dwo_symbol_file) {
-      DWARFCompileUnit *dwo_cu = m_dwo_symbol_file->GetCompileUnit();
+      DWARFUnit *dwo_cu = m_dwo_symbol_file->GetCompileUnit();
       const DWARFDebugInfoEntry *dwo_die = dwo_cu->DIEPtr();
       if (dwo_die)
         dwo_die->BuildFunctionAddressRangeTable(m_dwo_symbol_file.get(), dwo_cu,

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h Sun Mar 18 13:11:02 2018
@@ -12,13 +12,11 @@
 
 #include "DWARFUnit.h"
 
-typedef std::shared_ptr<DWARFCompileUnit> DWARFCompileUnitSP;
-
 class DWARFCompileUnit : public DWARFUnit {
   friend class DWARFUnit;
 
 public:
-  static DWARFCompileUnitSP Extract(SymbolFileDWARF *dwarf2Data,
+  static DWARFUnitSP Extract(SymbolFileDWARF *dwarf2Data,
       lldb::offset_t *offset_ptr);
 
   size_t ExtractDIEsIfNeeded(bool cu_die_only);

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp Sun Mar 18 13:11:02 2018
@@ -10,7 +10,7 @@
 #include "DWARFDIE.h"
 
 #include "DWARFASTParser.h"
-#include "DWARFCompileUnit.h"
+#include "DWARFUnit.h"
 #include "DWARFDIECollection.h"
 #include "DWARFDebugAbbrev.h"
 #include "DWARFDebugAranges.h"
@@ -121,7 +121,7 @@ int64_t DWARFDIE::GetAttributeValueAsSig
 DWARFDIE
 DWARFDIE::GetAttributeValueAsReferenceDIE(const dw_attr_t attr) const {
   if (IsValid()) {
-    DWARFCompileUnit *cu = GetCU();
+    DWARFUnit *cu = GetCU();
     SymbolFileDWARF *dwarf = cu->GetSymbolFileDWARF();
     const bool check_specification_or_abstract_origin = true;
     DWARFFormValue form_value;
@@ -154,7 +154,7 @@ DWARFDIE
 DWARFDIE::LookupDeepestBlock(lldb::addr_t file_addr) const {
   if (IsValid()) {
     SymbolFileDWARF *dwarf = GetDWARF();
-    DWARFCompileUnit *cu = GetCU();
+    DWARFUnit *cu = GetCU();
     DWARFDebugInfoEntry *function_die = nullptr;
     DWARFDebugInfoEntry *block_die = nullptr;
     if (m_die->LookupAddress(file_addr, dwarf, cu, &function_die, &block_die)) {

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDIE.h Sun Mar 18 13:11:02 2018
@@ -16,7 +16,7 @@
 struct DIERef;
 class DWARFASTParser;
 class DWARFAttributes;
-class DWARFCompileUnit;
+class DWARFUnit;
 class DWARFDebugInfoEntry;
 class DWARFDeclContext;
 class DWARFDIECollection;
@@ -26,17 +26,17 @@ class DWARFDIE {
 public:
   DWARFDIE() : m_cu(nullptr), m_die(nullptr) {}
 
-  DWARFDIE(DWARFCompileUnit *cu, DWARFDebugInfoEntry *die)
+  DWARFDIE(DWARFUnit *cu, DWARFDebugInfoEntry *die)
       : m_cu(cu), m_die(die) {}
 
-  DWARFDIE(const DWARFCompileUnit *cu, DWARFDebugInfoEntry *die)
-      : m_cu(const_cast<DWARFCompileUnit *>(cu)), m_die(die) {}
+  DWARFDIE(const DWARFUnit *cu, DWARFDebugInfoEntry *die)
+      : m_cu(const_cast<DWARFUnit *>(cu)), m_die(die) {}
 
-  DWARFDIE(DWARFCompileUnit *cu, const DWARFDebugInfoEntry *die)
+  DWARFDIE(DWARFUnit *cu, const DWARFDebugInfoEntry *die)
       : m_cu(cu), m_die(const_cast<DWARFDebugInfoEntry *>(die)) {}
 
-  DWARFDIE(const DWARFCompileUnit *cu, const DWARFDebugInfoEntry *die)
-      : m_cu(const_cast<DWARFCompileUnit *>(cu)),
+  DWARFDIE(const DWARFUnit *cu, const DWARFDebugInfoEntry *die)
+      : m_cu(const_cast<DWARFUnit *>(cu)),
         m_die(const_cast<DWARFDebugInfoEntry *>(die)) {}
 
   //----------------------------------------------------------------------
@@ -57,7 +57,7 @@ public:
   //----------------------------------------------------------------------
   SymbolFileDWARF *GetDWARF() const;
 
-  DWARFCompileUnit *GetCU() const { return m_cu; }
+  DWARFUnit *GetCU() const { return m_cu; }
 
   DWARFDebugInfoEntry *GetDIE() const { return m_die; }
 
@@ -67,7 +67,7 @@ public:
 
   DWARFASTParser *GetDWARFParser() const;
 
-  void Set(DWARFCompileUnit *cu, DWARFDebugInfoEntry *die) {
+  void Set(DWARFUnit *cu, DWARFDebugInfoEntry *die) {
     if (cu && die) {
       m_cu = cu;
       m_die = die;
@@ -211,7 +211,7 @@ public:
   lldb_private::CompilerDeclContext GetContainingDeclContext() const;
 
 protected:
-  DWARFCompileUnit *m_cu;
+  DWARFUnit *m_cu;
   DWARFDebugInfoEntry *m_die;
 };
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp Sun Mar 18 13:11:02 2018
@@ -18,7 +18,7 @@
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/Timer.h"
 
-#include "DWARFCompileUnit.h"
+#include "DWARFUnit.h"
 #include "DWARFDebugInfo.h"
 #include "LogChannelDWARF.h"
 #include "SymbolFileDWARF.h"
@@ -82,7 +82,7 @@ bool DWARFDebugAranges::Generate(SymbolF
     uint32_t cu_idx = 0;
     const uint32_t num_compile_units = dwarf2Data->GetNumCompileUnits();
     for (cu_idx = 0; cu_idx < num_compile_units; ++cu_idx) {
-      DWARFCompileUnit *cu = debug_info->GetCompileUnitAtIndex(cu_idx);
+      DWARFUnit *cu = debug_info->GetCompileUnitAtIndex(cu_idx);
       if (cu)
         cu->BuildAddressRangeTable(dwarf2Data, this);
     }

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp Sun Mar 18 13:11:02 2018
@@ -72,7 +72,7 @@ DWARFDebugAranges &DWARFDebugInfo::GetCo
     bool printed = false;
     const size_t num_compile_units = GetNumCompileUnits();
     for (size_t idx = 0; idx < num_compile_units; ++idx) {
-      DWARFCompileUnit *cu = GetCompileUnitAtIndex(idx);
+      DWARFUnit *cu = GetCompileUnitAtIndex(idx);
 
       dw_offset_t offset = cu->GetOffset();
       if (cus_with_data.find(offset) == cus_with_data.end()) {
@@ -97,7 +97,7 @@ void DWARFDebugInfo::ParseCompileUnitHea
   if (m_compile_units.empty()) {
     if (m_dwarf2Data != NULL) {
       lldb::offset_t offset = 0;
-      DWARFCompileUnitSP cu_sp;
+      DWARFUnitSP cu_sp;
       while ((cu_sp = DWARFCompileUnit::Extract(m_dwarf2Data, &offset))) {
         m_compile_units.push_back(cu_sp);
 
@@ -112,14 +112,14 @@ size_t DWARFDebugInfo::GetNumCompileUnit
   return m_compile_units.size();
 }
 
-DWARFCompileUnit *DWARFDebugInfo::GetCompileUnitAtIndex(uint32_t idx) {
-  DWARFCompileUnit *cu = NULL;
+DWARFUnit *DWARFDebugInfo::GetCompileUnitAtIndex(uint32_t idx) {
+  DWARFUnit *cu = NULL;
   if (idx < GetNumCompileUnits())
     cu = m_compile_units[idx].get();
   return cu;
 }
 
-bool DWARFDebugInfo::ContainsCompileUnit(const DWARFCompileUnit *cu) const {
+bool DWARFDebugInfo::ContainsCompileUnit(const DWARFUnit *cu) const {
   // Not a verify efficient function, but it is handy for use in assertions
   // to make sure that a compile unit comes from a debug information file.
   CompileUnitColl::const_iterator end_pos = m_compile_units.end();
@@ -133,13 +133,13 @@ bool DWARFDebugInfo::ContainsCompileUnit
 }
 
 bool DWARFDebugInfo::OffsetLessThanCompileUnitOffset(
-    dw_offset_t offset, const DWARFCompileUnitSP &cu_sp) {
+    dw_offset_t offset, const DWARFUnitSP &cu_sp) {
   return offset < cu_sp->GetOffset();
 }
 
-DWARFCompileUnit *DWARFDebugInfo::GetCompileUnit(dw_offset_t cu_offset,
+DWARFUnit *DWARFDebugInfo::GetCompileUnit(dw_offset_t cu_offset,
                                                  uint32_t *idx_ptr) {
-  DWARFCompileUnitSP cu_sp;
+  DWARFUnitSP cu_sp;
   uint32_t cu_idx = DW_INVALID_INDEX;
   if (cu_offset != DW_INVALID_OFFSET) {
     ParseCompileUnitHeadersIfNeeded();
@@ -170,18 +170,18 @@ DWARFCompileUnit *DWARFDebugInfo::GetCom
   return cu_sp.get();
 }
 
-DWARFCompileUnit *DWARFDebugInfo::GetCompileUnit(const DIERef &die_ref) {
+DWARFUnit *DWARFDebugInfo::GetCompileUnit(const DIERef &die_ref) {
   if (die_ref.cu_offset == DW_INVALID_OFFSET)
     return GetCompileUnitContainingDIEOffset(die_ref.die_offset);
   else
     return GetCompileUnit(die_ref.cu_offset);
 }
 
-DWARFCompileUnit *
+DWARFUnit *
 DWARFDebugInfo::GetCompileUnitContainingDIEOffset(dw_offset_t die_offset) {
   ParseCompileUnitHeadersIfNeeded();
 
-  DWARFCompileUnitSP cu_sp;
+  DWARFUnitSP cu_sp;
 
   // Watch out for single compile unit executable as they are pretty common
   const size_t num_cus = m_compile_units.size();
@@ -205,7 +205,7 @@ DWARFDebugInfo::GetCompileUnitContaining
 
 DWARFDIE
 DWARFDebugInfo::GetDIEForDIEOffset(dw_offset_t die_offset) {
-  DWARFCompileUnit *cu = GetCompileUnitContainingDIEOffset(die_offset);
+  DWARFUnit *cu = GetCompileUnitContainingDIEOffset(die_offset);
   if (cu)
     return cu->GetDIE(die_offset);
   return DWARFDIE();
@@ -218,7 +218,7 @@ DWARFDebugInfo::GetDIEForDIEOffset(dw_of
 //----------------------------------------------------------------------
 DWARFDIE
 DWARFDebugInfo::GetDIE(const DIERef &die_ref) {
-  DWARFCompileUnit *cu = GetCompileUnit(die_ref);
+  DWARFUnit *cu = GetCompileUnit(die_ref);
   if (cu)
     return cu->GetDIE(die_ref.die_offset);
   return DWARFDIE(); // Not found
@@ -241,7 +241,7 @@ void DWARFDebugInfo::Parse(SymbolFileDWA
     uint32_t depth = 0;
     DWARFDebugInfoEntry die;
 
-    DWARFCompileUnitSP cu;
+    DWARFUnitSP cu;
     while ((cu = DWARFCompileUnit::Extract(dwarf2Data, &offset))) {
       const dw_offset_t next_cu_offset = cu->GetNextCompileUnitOffset();
 
@@ -308,7 +308,7 @@ typedef struct DumpInfo {
 // whether a single DIE is to be dumped (or all of the data).
 //----------------------------------------------------------------------
 static dw_offset_t DumpCallback(SymbolFileDWARF *dwarf2Data,
-                                DWARFCompileUnit *cu, DWARFDebugInfoEntry *die,
+                                DWARFUnit *cu, DWARFDebugInfoEntry *die,
                                 const dw_offset_t next_offset,
                                 const uint32_t curr_depth, void *userData) {
   DumpInfo *dumpInfo = (DumpInfo *)userData;
@@ -482,7 +482,7 @@ void DWARFDebugInfo::Dump(Stream *s, con
   uint32_t curr_depth = 0;
   ParseCompileUnitHeadersIfNeeded();
   for (pos = m_compile_units.begin(); pos != m_compile_units.end(); ++pos) {
-    DWARFCompileUnit *cu = pos->get();
+    DWARFUnit *cu = pos->get();
     DumpCallback(m_dwarf2Data, cu, NULL, 0, curr_depth, &dumpInfo);
 
     const DWARFDIE die = cu->DIE();

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h Sun Mar 18 13:11:02 2018
@@ -13,7 +13,7 @@
 #include <map>
 #include <vector>
 
-#include "DWARFCompileUnit.h"
+#include "DWARFUnit.h"
 #include "DWARFDIE.h"
 #include "SymbolFileDWARF.h"
 #include "lldb/Core/STLUtils.h"
@@ -27,7 +27,7 @@ typedef CStringToDIEMap::const_iterator
 class DWARFDebugInfo {
 public:
   typedef dw_offset_t (*Callback)(SymbolFileDWARF *dwarf2Data,
-                                  DWARFCompileUnit *cu,
+                                  DWARFUnit *cu,
                                   DWARFDebugInfoEntry *die,
                                   const dw_offset_t next_offset,
                                   const uint32_t depth, void *userData);
@@ -36,12 +36,11 @@ public:
   void SetDwarfData(SymbolFileDWARF *dwarf2Data);
 
   size_t GetNumCompileUnits();
-  bool ContainsCompileUnit(const DWARFCompileUnit *cu) const;
-  DWARFCompileUnit *GetCompileUnitAtIndex(uint32_t idx);
-  DWARFCompileUnit *GetCompileUnit(dw_offset_t cu_offset,
-                                   uint32_t *idx_ptr = NULL);
-  DWARFCompileUnit *GetCompileUnitContainingDIEOffset(dw_offset_t die_offset);
-  DWARFCompileUnit *GetCompileUnit(const DIERef &die_ref);
+  bool ContainsCompileUnit(const DWARFUnit *cu) const;
+  DWARFUnit *GetCompileUnitAtIndex(uint32_t idx);
+  DWARFUnit *GetCompileUnit(dw_offset_t cu_offset, uint32_t *idx_ptr = NULL);
+  DWARFUnit *GetCompileUnitContainingDIEOffset(dw_offset_t die_offset);
+  DWARFUnit *GetCompileUnit(const DIERef &die_ref);
   DWARFDIE GetDIEForDIEOffset(dw_offset_t die_offset);
   DWARFDIE GetDIE(const DIERef &die_ref);
 
@@ -63,9 +62,9 @@ public:
 
 protected:
   static bool OffsetLessThanCompileUnitOffset(dw_offset_t offset,
-                                              const DWARFCompileUnitSP &cu_sp);
+                                              const DWARFUnitSP &cu_sp);
 
-  typedef std::vector<DWARFCompileUnitSP> CompileUnitColl;
+  typedef std::vector<DWARFUnitSP> CompileUnitColl;
 
   //----------------------------------------------------------------------
   // Member variables

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp Sun Mar 18 13:11:02 2018
@@ -18,7 +18,7 @@
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Utility/Stream.h"
 
-#include "DWARFCompileUnit.h"
+#include "DWARFUnit.h"
 #include "DWARFDIECollection.h"
 #include "DWARFDebugAbbrev.h"
 #include "DWARFDebugAranges.h"
@@ -34,7 +34,7 @@ using namespace std;
 extern int g_verbose;
 
 bool DWARFDebugInfoEntry::FastExtract(
-    const DWARFDataExtractor &debug_info_data, const DWARFCompileUnit *cu,
+    const DWARFDataExtractor &debug_info_data, const DWARFUnit *cu,
     const DWARFFormValue::FixedFormSizes &fixed_form_sizes,
     lldb::offset_t *offset_ptr) {
   m_offset = *offset_ptr;
@@ -194,7 +194,7 @@ bool DWARFDebugInfoEntry::FastExtract(
 // starting at the given offset
 //----------------------------------------------------------------------
 bool DWARFDebugInfoEntry::Extract(SymbolFileDWARF *dwarf2Data,
-                                  const DWARFCompileUnit *cu,
+                                  const DWARFUnit *cu,
                                   lldb::offset_t *offset_ptr) {
   const DWARFDataExtractor &debug_info_data = dwarf2Data->get_debug_info_data();
   //    const DWARFDataExtractor& debug_str_data =
@@ -220,7 +220,7 @@ bool DWARFDebugInfoEntry::Extract(Symbol
 
         bool isCompileUnitTag = m_tag == DW_TAG_compile_unit;
         if (cu && isCompileUnitTag)
-          const_cast<DWARFCompileUnit *>(cu)->SetBaseAddress(0);
+          const_cast<DWARFUnit *>(cu)->SetBaseAddress(0);
 
         // Skip all data in the .debug_info for the attributes
         const uint32_t numAttributes = abbrevDecl->NumAttributes();
@@ -235,7 +235,7 @@ bool DWARFDebugInfoEntry::Extract(Symbol
             DWARFFormValue form_value(cu, form);
             if (form_value.ExtractValue(debug_info_data, &offset)) {
               if (attr == DW_AT_low_pc || attr == DW_AT_entry_pc)
-                const_cast<DWARFCompileUnit *>(cu)->SetBaseAddress(
+                const_cast<DWARFUnit *>(cu)->SetBaseAddress(
                     form_value.Address());
             }
           } else {
@@ -360,7 +360,7 @@ bool DWARFDebugInfoEntry::Extract(Symbol
 // all of it's attributes to the specified stream.
 //----------------------------------------------------------------------
 void DWARFDebugInfoEntry::DumpAncestry(SymbolFileDWARF *dwarf2Data,
-                                       const DWARFCompileUnit *cu,
+                                       const DWARFUnit *cu,
                                        const DWARFDebugInfoEntry *oldest,
                                        Stream &s,
                                        uint32_t recurse_depth) const {
@@ -378,7 +378,7 @@ void DWARFDebugInfoEntry::DumpAncestry(S
 // attributes.
 //----------------------------------------------------------------------
 bool DWARFDebugInfoEntry::GetDIENamesAndRanges(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu, const char *&name,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, const char *&name,
     const char *&mangled, DWARFRangeList &ranges, int &decl_file,
     int &decl_line, int &decl_column, int &call_file, int &call_line,
     int &call_column, DWARFExpression *frame_base) const {
@@ -586,7 +586,7 @@ bool DWARFDebugInfoEntry::GetDIENamesAnd
 // specified stream.
 //----------------------------------------------------------------------
 void DWARFDebugInfoEntry::Dump(SymbolFileDWARF *dwarf2Data,
-                               const DWARFCompileUnit *cu, Stream &s,
+                               const DWARFUnit *cu, Stream &s,
                                uint32_t recurse_depth) const {
   const DWARFDataExtractor &debug_info_data = dwarf2Data->get_debug_info_data();
   lldb::offset_t offset = m_offset;
@@ -639,7 +639,7 @@ void DWARFDebugInfoEntry::Dump(SymbolFil
 }
 
 void DWARFDebugInfoEntry::DumpLocation(SymbolFileDWARF *dwarf2Data,
-                                       DWARFCompileUnit *cu, Stream &s) const {
+                                       DWARFUnit *cu, Stream &s) const {
   const DWARFDIE cu_die = cu->GetCompileUnitDIEOnly();
   const char *cu_name = NULL;
   if (cu_die)
@@ -663,7 +663,7 @@ void DWARFDebugInfoEntry::DumpLocation(S
 // show enumeration values for attributes, etc).
 //----------------------------------------------------------------------
 void DWARFDebugInfoEntry::DumpAttribute(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
     const DWARFDataExtractor &debug_info_data, lldb::offset_t *offset_ptr,
     Stream &s, dw_attr_t attr, dw_form_t form) {
   bool show_form = s.GetFlags().Test(DWARFDebugInfo::eDumpFlag_ShowForm);
@@ -714,7 +714,7 @@ void DWARFDebugInfoEntry::DumpAttribute(
                                       (*offset_ptr) - form_value.Unsigned(),
                                       form_value.Unsigned());
       DWARFExpression::PrintDWARFExpression(
-          s, locationData, DWARFCompileUnit::GetAddressByteSize(cu), 4, false);
+          s, locationData, DWARFUnit::GetAddressByteSize(cu), 4, false);
     } else {
       // We have a location list offset as the value that is
       // the offset into the .debug_loc section that describes
@@ -764,7 +764,7 @@ void DWARFDebugInfoEntry::DumpAttribute(
 // take precedence (this can happen for declaration attributes).
 //----------------------------------------------------------------------
 size_t DWARFDebugInfoEntry::GetAttributes(
-    const DWARFCompileUnit *cu, DWARFFormValue::FixedFormSizes fixed_form_sizes,
+    const DWARFUnit *cu, DWARFFormValue::FixedFormSizes fixed_form_sizes,
     DWARFAttributes &attributes, uint32_t curr_depth) const {
   SymbolFileDWARF *dwarf2Data = nullptr;
   const DWARFAbbreviationDeclaration *abbrevDecl = nullptr;
@@ -819,7 +819,7 @@ size_t DWARFDebugInfoEntry::GetAttribute
         if (form_value.ExtractValue(debug_info_data, &offset)) {
           dw_offset_t die_offset = form_value.Reference();
           DWARFDIE spec_die =
-              const_cast<DWARFCompileUnit *>(cu)->GetDIE(die_offset);
+              const_cast<DWARFUnit *>(cu)->GetDIE(die_offset);
           if (spec_die)
             spec_die.GetAttributes(attributes, curr_depth + 1);
         }
@@ -846,7 +846,7 @@ size_t DWARFDebugInfoEntry::GetAttribute
 // would be a compile unit header).
 //----------------------------------------------------------------------
 dw_offset_t DWARFDebugInfoEntry::GetAttributeValue(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
     const dw_attr_t attr, DWARFFormValue &form_value,
     dw_offset_t *end_attr_offset_ptr,
     bool check_specification_or_abstract_origin) const {
@@ -886,7 +886,7 @@ dw_offset_t DWARFDebugInfoEntry::GetAttr
   if (check_specification_or_abstract_origin) {
     if (GetAttributeValue(dwarf2Data, cu, DW_AT_specification, form_value)) {
       DWARFDIE die =
-          const_cast<DWARFCompileUnit *>(cu)->GetDIE(form_value.Reference());
+          const_cast<DWARFUnit *>(cu)->GetDIE(form_value.Reference());
       if (die) {
         dw_offset_t die_offset = die.GetDIE()->GetAttributeValue(
             die.GetDWARF(), die.GetCU(), attr, form_value, end_attr_offset_ptr,
@@ -898,7 +898,7 @@ dw_offset_t DWARFDebugInfoEntry::GetAttr
 
     if (GetAttributeValue(dwarf2Data, cu, DW_AT_abstract_origin, form_value)) {
       DWARFDIE die =
-          const_cast<DWARFCompileUnit *>(cu)->GetDIE(form_value.Reference());
+          const_cast<DWARFUnit *>(cu)->GetDIE(form_value.Reference());
       if (die) {
         dw_offset_t die_offset = die.GetDIE()->GetAttributeValue(
             die.GetDWARF(), die.GetCU(), attr, form_value, end_attr_offset_ptr,
@@ -912,7 +912,7 @@ dw_offset_t DWARFDebugInfoEntry::GetAttr
   if (!dwo_symbol_file)
     return 0;
 
-  DWARFCompileUnit *dwo_cu = dwo_symbol_file->GetCompileUnit();
+  DWARFUnit *dwo_cu = dwo_symbol_file->GetCompileUnit();
   if (!dwo_cu)
     return 0;
 
@@ -934,7 +934,7 @@ dw_offset_t DWARFDebugInfoEntry::GetAttr
 // and it's content doesn't change.
 //----------------------------------------------------------------------
 const char *DWARFDebugInfoEntry::GetAttributeValueAsString(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
     const dw_attr_t attr, const char *fail_value,
     bool check_specification_or_abstract_origin) const {
   DWARFFormValue form_value;
@@ -950,7 +950,7 @@ const char *DWARFDebugInfoEntry::GetAttr
 // Get the value of an attribute as unsigned and return it.
 //----------------------------------------------------------------------
 uint64_t DWARFDebugInfoEntry::GetAttributeValueAsUnsigned(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
     const dw_attr_t attr, uint64_t fail_value,
     bool check_specification_or_abstract_origin) const {
   DWARFFormValue form_value;
@@ -966,7 +966,7 @@ uint64_t DWARFDebugInfoEntry::GetAttribu
 // Get the value of an attribute a signed value and return it.
 //----------------------------------------------------------------------
 int64_t DWARFDebugInfoEntry::GetAttributeValueAsSigned(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
     const dw_attr_t attr, int64_t fail_value,
     bool check_specification_or_abstract_origin) const {
   DWARFFormValue form_value;
@@ -983,7 +983,7 @@ int64_t DWARFDebugInfoEntry::GetAttribut
 // unit relative offsets as needed.
 //----------------------------------------------------------------------
 uint64_t DWARFDebugInfoEntry::GetAttributeValueAsReference(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
     const dw_attr_t attr, uint64_t fail_value,
     bool check_specification_or_abstract_origin) const {
   DWARFFormValue form_value;
@@ -994,7 +994,7 @@ uint64_t DWARFDebugInfoEntry::GetAttribu
 }
 
 uint64_t DWARFDebugInfoEntry::GetAttributeValueAsAddress(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
     const dw_attr_t attr, uint64_t fail_value,
     bool check_specification_or_abstract_origin) const {
   DWARFFormValue form_value;
@@ -1013,7 +1013,7 @@ uint64_t DWARFDebugInfoEntry::GetAttribu
 // Returns the hi_pc or fail_value.
 //----------------------------------------------------------------------
 dw_addr_t DWARFDebugInfoEntry::GetAttributeHighPC(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu, dw_addr_t lo_pc,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, dw_addr_t lo_pc,
     uint64_t fail_value, bool check_specification_or_abstract_origin) const {
   DWARFFormValue form_value;
   if (GetAttributeValue(dwarf2Data, cu, DW_AT_high_pc, form_value, nullptr,
@@ -1037,7 +1037,7 @@ dw_addr_t DWARFDebugInfoEntry::GetAttrib
 // Returns true or sets lo_pc and hi_pc to fail_value.
 //----------------------------------------------------------------------
 bool DWARFDebugInfoEntry::GetAttributeAddressRange(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu, dw_addr_t &lo_pc,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, dw_addr_t &lo_pc,
     dw_addr_t &hi_pc, uint64_t fail_value,
     bool check_specification_or_abstract_origin) const {
   lo_pc = GetAttributeValueAsAddress(dwarf2Data, cu, DW_AT_low_pc, fail_value,
@@ -1054,7 +1054,7 @@ bool DWARFDebugInfoEntry::GetAttributeAd
 }
 
 size_t DWARFDebugInfoEntry::GetAttributeAddressRanges(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
     DWARFRangeList &ranges, bool check_hi_lo_pc,
     bool check_specification_or_abstract_origin) const {
   ranges.Clear();
@@ -1087,7 +1087,7 @@ size_t DWARFDebugInfoEntry::GetAttribute
 // else return NULL.
 //----------------------------------------------------------------------
 const char *DWARFDebugInfoEntry::GetName(SymbolFileDWARF *dwarf2Data,
-                                         const DWARFCompileUnit *cu) const {
+                                         const DWARFUnit *cu) const {
   return GetAttributeValueAsString(dwarf2Data, cu, DW_AT_name, nullptr, true);
 }
 
@@ -1099,7 +1099,7 @@ const char *DWARFDebugInfoEntry::GetName
 //----------------------------------------------------------------------
 const char *
 DWARFDebugInfoEntry::GetMangledName(SymbolFileDWARF *dwarf2Data,
-                                    const DWARFCompileUnit *cu,
+                                    const DWARFUnit *cu,
                                     bool substitute_name_allowed) const {
   const char *name = nullptr;
 
@@ -1127,7 +1127,7 @@ DWARFDebugInfoEntry::GetMangledName(Symb
 // .debug_pubnames or .debug_pubtypes section.
 //----------------------------------------------------------------------
 const char *DWARFDebugInfoEntry::GetPubname(SymbolFileDWARF *dwarf2Data,
-                                            const DWARFCompileUnit *cu) const {
+                                            const DWARFUnit *cu) const {
   const char *name = nullptr;
   if (!dwarf2Data)
     return name;
@@ -1156,7 +1156,7 @@ const char *DWARFDebugInfoEntry::GetPubn
 // then nothing is printed.
 //----------------------------------------------------------------------
 bool DWARFDebugInfoEntry::GetName(SymbolFileDWARF *dwarf2Data,
-                                  const DWARFCompileUnit *cu,
+                                  const DWARFUnit *cu,
                                   const dw_offset_t die_offset, Stream &s) {
   if (dwarf2Data == NULL) {
     s.PutCString("NULL");
@@ -1190,7 +1190,7 @@ bool DWARFDebugInfoEntry::GetName(Symbol
 // a type identifier.
 //----------------------------------------------------------------------
 bool DWARFDebugInfoEntry::AppendTypeName(SymbolFileDWARF *dwarf2Data,
-                                         const DWARFCompileUnit *cu,
+                                         const DWARFUnit *cu,
                                          const dw_offset_t die_offset,
                                          Stream &s) {
   if (dwarf2Data == NULL) {
@@ -1318,7 +1318,7 @@ bool DWARFDebugInfoEntry::AppendTypeName
 // BuildAddressRangeTable
 //----------------------------------------------------------------------
 void DWARFDebugInfoEntry::BuildAddressRangeTable(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
     DWARFDebugAranges *debug_aranges) const {
   if (m_tag) {
     if (m_tag == DW_TAG_subprogram) {
@@ -1349,7 +1349,7 @@ void DWARFDebugInfoEntry::BuildAddressRa
 // standard .debug_aranges section does it).
 //----------------------------------------------------------------------
 void DWARFDebugInfoEntry::BuildFunctionAddressRangeTable(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
     DWARFDebugAranges *debug_aranges) const {
   if (m_tag) {
     if (m_tag == DW_TAG_subprogram) {
@@ -1372,14 +1372,14 @@ void DWARFDebugInfoEntry::BuildFunctionA
 }
 
 void DWARFDebugInfoEntry::GetDeclContextDIEs(
-    DWARFCompileUnit *cu, DWARFDIECollection &decl_context_dies) const {
+    DWARFUnit *cu, DWARFDIECollection &decl_context_dies) const {
 
   DWARFDIE die(cu, const_cast<DWARFDebugInfoEntry *>(this));
   die.GetDeclContextDIEs(decl_context_dies);
 }
 
 void DWARFDebugInfoEntry::GetDWARFDeclContext(
-    SymbolFileDWARF *dwarf2Data, DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, DWARFUnit *cu,
     DWARFDeclContext &dwarf_decl_ctx) const {
   const dw_tag_t tag = Tag();
   if (tag != DW_TAG_compile_unit) {
@@ -1395,7 +1395,7 @@ void DWARFDebugInfoEntry::GetDWARFDeclCo
 }
 
 bool DWARFDebugInfoEntry::MatchesDWARFDeclContext(
-    SymbolFileDWARF *dwarf2Data, DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, DWARFUnit *cu,
     const DWARFDeclContext &dwarf_decl_ctx) const {
 
   DWARFDeclContext this_dwarf_decl_ctx;
@@ -1405,7 +1405,7 @@ bool DWARFDebugInfoEntry::MatchesDWARFDe
 
 DWARFDIE
 DWARFDebugInfoEntry::GetParentDeclContextDIE(SymbolFileDWARF *dwarf2Data,
-                                             DWARFCompileUnit *cu) const {
+                                             DWARFUnit *cu) const {
   DWARFAttributes attributes;
   GetAttributes(cu, DWARFFormValue::FixedFormSizes(), attributes);
   return GetParentDeclContextDIE(dwarf2Data, cu, attributes);
@@ -1413,7 +1413,7 @@ DWARFDebugInfoEntry::GetParentDeclContex
 
 DWARFDIE
 DWARFDebugInfoEntry::GetParentDeclContextDIE(
-    SymbolFileDWARF *dwarf2Data, DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, DWARFUnit *cu,
     const DWARFAttributes &attributes) const {
   DWARFDIE die(cu, const_cast<DWARFDebugInfoEntry *>(this));
 
@@ -1465,7 +1465,7 @@ DWARFDebugInfoEntry::GetParentDeclContex
 }
 
 const char *DWARFDebugInfoEntry::GetQualifiedName(SymbolFileDWARF *dwarf2Data,
-                                                  DWARFCompileUnit *cu,
+                                                  DWARFUnit *cu,
                                                   std::string &storage) const {
   DWARFAttributes attributes;
   GetAttributes(cu, DWARFFormValue::FixedFormSizes(), attributes);
@@ -1473,7 +1473,7 @@ const char *DWARFDebugInfoEntry::GetQual
 }
 
 const char *DWARFDebugInfoEntry::GetQualifiedName(
-    SymbolFileDWARF *dwarf2Data, DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, DWARFUnit *cu,
     const DWARFAttributes &attributes, std::string &storage) const {
 
   const char *name = GetName(dwarf2Data, cu);
@@ -1529,7 +1529,7 @@ const char *DWARFDebugInfoEntry::GetQual
 //----------------------------------------------------------------------
 bool DWARFDebugInfoEntry::LookupAddress(const dw_addr_t address,
                                         SymbolFileDWARF *dwarf2Data,
-                                        const DWARFCompileUnit *cu,
+                                        const DWARFUnit *cu,
                                         DWARFDebugInfoEntry **function_die,
                                         DWARFDebugInfoEntry **block_die) {
   bool found_address = false;
@@ -1772,7 +1772,7 @@ bool DWARFDebugInfoEntry::LookupAddress(
 
 const DWARFAbbreviationDeclaration *
 DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr(
-    SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+    SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
     lldb::offset_t &offset) const {
   if (dwarf2Data) {
     offset = GetOffset();

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h Sun Mar 18 13:11:02 2018
@@ -61,127 +61,127 @@ public:
         m_tag(0) {}
 
   void BuildAddressRangeTable(SymbolFileDWARF *dwarf2Data,
-                              const DWARFCompileUnit *cu,
+                              const DWARFUnit *cu,
                               DWARFDebugAranges *debug_aranges) const;
 
   void BuildFunctionAddressRangeTable(SymbolFileDWARF *dwarf2Data,
-                                      const DWARFCompileUnit *cu,
+                                      const DWARFUnit *cu,
                                       DWARFDebugAranges *debug_aranges) const;
 
   bool FastExtract(const lldb_private::DWARFDataExtractor &debug_info_data,
-                   const DWARFCompileUnit *cu,
+                   const DWARFUnit *cu,
                    const DWARFFormValue::FixedFormSizes &fixed_form_sizes,
                    lldb::offset_t *offset_ptr);
 
-  bool Extract(SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+  bool Extract(SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
                lldb::offset_t *offset_ptr);
 
   bool LookupAddress(const dw_addr_t address, SymbolFileDWARF *dwarf2Data,
-                     const DWARFCompileUnit *cu,
+                     const DWARFUnit *cu,
                      DWARFDebugInfoEntry **function_die,
                      DWARFDebugInfoEntry **block_die);
 
-  size_t GetAttributes(const DWARFCompileUnit *cu,
+  size_t GetAttributes(const DWARFUnit *cu,
                        DWARFFormValue::FixedFormSizes fixed_form_sizes,
                        DWARFAttributes &attrs,
                        uint32_t curr_depth = 0)
       const; // "curr_depth" for internal use only, don't set this yourself!!!
 
   dw_offset_t
-  GetAttributeValue(SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+  GetAttributeValue(SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
                     const dw_attr_t attr, DWARFFormValue &formValue,
                     dw_offset_t *end_attr_offset_ptr = nullptr,
                     bool check_specification_or_abstract_origin = false) const;
 
   const char *GetAttributeValueAsString(
-      SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+      SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
       const dw_attr_t attr, const char *fail_value,
       bool check_specification_or_abstract_origin = false) const;
 
   uint64_t GetAttributeValueAsUnsigned(
-      SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+      SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
       const dw_attr_t attr, uint64_t fail_value,
       bool check_specification_or_abstract_origin = false) const;
 
   uint64_t GetAttributeValueAsReference(
-      SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+      SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
       const dw_attr_t attr, uint64_t fail_value,
       bool check_specification_or_abstract_origin = false) const;
 
   int64_t GetAttributeValueAsSigned(
-      SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+      SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
       const dw_attr_t attr, int64_t fail_value,
       bool check_specification_or_abstract_origin = false) const;
 
   uint64_t GetAttributeValueAsAddress(
-      SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+      SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
       const dw_attr_t attr, uint64_t fail_value,
       bool check_specification_or_abstract_origin = false) const;
 
   dw_addr_t
-  GetAttributeHighPC(SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+  GetAttributeHighPC(SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
                      dw_addr_t lo_pc, uint64_t fail_value,
                      bool check_specification_or_abstract_origin = false) const;
 
   bool GetAttributeAddressRange(
-      SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu, dw_addr_t &lo_pc,
+      SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu, dw_addr_t &lo_pc,
       dw_addr_t &hi_pc, uint64_t fail_value,
       bool check_specification_or_abstract_origin = false) const;
 
   size_t GetAttributeAddressRanges(
-      SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+      SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
       DWARFRangeList &ranges, bool check_hi_lo_pc,
       bool check_specification_or_abstract_origin = false) const;
 
   const char *GetName(SymbolFileDWARF *dwarf2Data,
-                      const DWARFCompileUnit *cu) const;
+                      const DWARFUnit *cu) const;
 
   const char *GetMangledName(SymbolFileDWARF *dwarf2Data,
-                             const DWARFCompileUnit *cu,
+                             const DWARFUnit *cu,
                              bool substitute_name_allowed = true) const;
 
   const char *GetPubname(SymbolFileDWARF *dwarf2Data,
-                         const DWARFCompileUnit *cu) const;
+                         const DWARFUnit *cu) const;
 
-  static bool GetName(SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+  static bool GetName(SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
                       const dw_offset_t die_offset, lldb_private::Stream &s);
 
   static bool AppendTypeName(SymbolFileDWARF *dwarf2Data,
-                             const DWARFCompileUnit *cu,
+                             const DWARFUnit *cu,
                              const dw_offset_t die_offset,
                              lldb_private::Stream &s);
 
   const char *GetQualifiedName(SymbolFileDWARF *dwarf2Data,
-                               DWARFCompileUnit *cu,
+                               DWARFUnit *cu,
                                std::string &storage) const;
 
   const char *GetQualifiedName(SymbolFileDWARF *dwarf2Data,
-                               DWARFCompileUnit *cu,
+                               DWARFUnit *cu,
                                const DWARFAttributes &attributes,
                                std::string &storage) const;
 
   static bool OffsetLessThan(const DWARFDebugInfoEntry &a,
                              const DWARFDebugInfoEntry &b);
 
-  void Dump(SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+  void Dump(SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
             lldb_private::Stream &s, uint32_t recurse_depth) const;
 
-  void DumpAncestry(SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+  void DumpAncestry(SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
                     const DWARFDebugInfoEntry *oldest, lldb_private::Stream &s,
                     uint32_t recurse_depth) const;
 
   static void
-  DumpAttribute(SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+  DumpAttribute(SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
                 const lldb_private::DWARFDataExtractor &debug_info_data,
                 lldb::offset_t *offset_ptr, lldb_private::Stream &s,
                 dw_attr_t attr, dw_form_t form);
   // This one dumps the comp unit name, objfile name and die offset for this die
   // so the stream S.
-  void DumpLocation(SymbolFileDWARF *dwarf2Data, DWARFCompileUnit *cu,
+  void DumpLocation(SymbolFileDWARF *dwarf2Data, DWARFUnit *cu,
                     lldb_private::Stream &s) const;
 
   bool
-  GetDIENamesAndRanges(SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
+  GetDIENamesAndRanges(SymbolFileDWARF *dwarf2Data, const DWARFUnit *cu,
                        const char *&name, const char *&mangled,
                        DWARFRangeList &rangeList, int &decl_file,
                        int &decl_line, int &decl_column, int &call_file,
@@ -190,7 +190,7 @@ public:
 
   const DWARFAbbreviationDeclaration *
   GetAbbreviationDeclarationPtr(SymbolFileDWARF *dwarf2Data,
-                                const DWARFCompileUnit *cu,
+                                const DWARFUnit *cu,
                                 lldb::offset_t &offset) const;
 
   dw_tag_t Tag() const { return m_tag; }
@@ -229,20 +229,20 @@ public:
     return (HasChildren() && !m_empty_children) ? this + 1 : NULL;
   }
 
-  void GetDeclContextDIEs(DWARFCompileUnit *cu,
+  void GetDeclContextDIEs(DWARFUnit *cu,
                           DWARFDIECollection &decl_context_dies) const;
 
-  void GetDWARFDeclContext(SymbolFileDWARF *dwarf2Data, DWARFCompileUnit *cu,
+  void GetDWARFDeclContext(SymbolFileDWARF *dwarf2Data, DWARFUnit *cu,
                            DWARFDeclContext &dwarf_decl_ctx) const;
 
   bool MatchesDWARFDeclContext(SymbolFileDWARF *dwarf2Data,
-                               DWARFCompileUnit *cu,
+                               DWARFUnit *cu,
                                const DWARFDeclContext &dwarf_decl_ctx) const;
 
   DWARFDIE GetParentDeclContextDIE(SymbolFileDWARF *dwarf2Data,
-                                   DWARFCompileUnit *cu) const;
+                                   DWARFUnit *cu) const;
   DWARFDIE GetParentDeclContextDIE(SymbolFileDWARF *dwarf2Data,
-                                   DWARFCompileUnit *cu,
+                                   DWARFUnit *cu,
                                    const DWARFAttributes &attributes) const;
 
   void SetParent(DWARFDebugInfoEntry *parent) {

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp Sun Mar 18 13:11:02 2018
@@ -12,10 +12,10 @@
 #include "lldb/Core/dwarf.h"
 #include "lldb/Utility/Stream.h"
 
-#include "DWARFCompileUnit.h"
+#include "DWARFUnit.h"
 #include "DWARFFormValue.h"
 
-class DWARFCompileUnit;
+class DWARFUnit;
 
 using namespace lldb_private;
 
@@ -154,7 +154,7 @@ DWARFFormValue::GetFixedFormSizesForAddr
 
 DWARFFormValue::DWARFFormValue() : m_cu(NULL), m_form(0), m_value() {}
 
-DWARFFormValue::DWARFFormValue(const DWARFCompileUnit *cu, dw_form_t form)
+DWARFFormValue::DWARFFormValue(const DWARFUnit *cu, dw_form_t form)
     : m_cu(cu), m_form(form), m_value() {}
 
 void DWARFFormValue::Clear() {
@@ -177,7 +177,7 @@ bool DWARFFormValue::ExtractValue(const
     case DW_FORM_addr:
       assert(m_cu);
       m_value.value.uval = data.GetMaxU64(
-          offset_ptr, DWARFCompileUnit::GetAddressByteSize(m_cu));
+          offset_ptr, DWARFUnit::GetAddressByteSize(m_cu));
       break;
     case DW_FORM_block2:
       m_value.value.uval = data.GetU16(offset_ptr);
@@ -220,7 +220,7 @@ bool DWARFFormValue::ExtractValue(const
     case DW_FORM_strp:
       assert(m_cu);
       m_value.value.uval =
-          data.GetMaxU64(offset_ptr, DWARFCompileUnit::IsDWARF64(m_cu) ? 8 : 4);
+          data.GetMaxU64(offset_ptr, DWARFUnit::IsDWARF64(m_cu) ? 8 : 4);
       break;
     //  case DW_FORM_APPLE_db_str:
     case DW_FORM_udata:
@@ -258,7 +258,7 @@ bool DWARFFormValue::ExtractValue(const
     case DW_FORM_sec_offset:
       assert(m_cu);
       m_value.value.uval =
-          data.GetMaxU64(offset_ptr, DWARFCompileUnit::IsDWARF64(m_cu) ? 8 : 4);
+          data.GetMaxU64(offset_ptr, DWARFUnit::IsDWARF64(m_cu) ? 8 : 4);
       break;
     case DW_FORM_flag_present:
       m_value.value.uval = 1;
@@ -296,7 +296,7 @@ bool DWARFFormValue::SkipValue(const DWA
 bool DWARFFormValue::SkipValue(dw_form_t form,
                                const DWARFDataExtractor &debug_info_data,
                                lldb::offset_t *offset_ptr,
-                               const DWARFCompileUnit *cu) {
+                               const DWARFUnit *cu) {
   uint8_t ref_addr_size;
   switch (form) {
   // Blocks if inlined data that have a length field and the data bytes
@@ -330,7 +330,7 @@ bool DWARFFormValue::SkipValue(dw_form_t
 
   // Compile unit address sized values
   case DW_FORM_addr:
-    *offset_ptr += DWARFCompileUnit::GetAddressByteSize(cu);
+    *offset_ptr += DWARFUnit::GetAddressByteSize(cu);
     return true;
 
   case DW_FORM_ref_addr:

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h Sun Mar 18 13:11:02 2018
@@ -13,7 +13,7 @@
 #include "DWARFDataExtractor.h"
 #include <stddef.h> // for NULL
 
-class DWARFCompileUnit;
+class DWARFUnit;
 
 class DWARFFormValue {
 public:
@@ -55,9 +55,9 @@ public:
   };
 
   DWARFFormValue();
-  DWARFFormValue(const DWARFCompileUnit *cu, dw_form_t form);
-  const DWARFCompileUnit *GetCompileUnit() const { return m_cu; }
-  void SetCompileUnit(const DWARFCompileUnit *cu) { m_cu = cu; }
+  DWARFFormValue(const DWARFUnit *cu, dw_form_t form);
+  const DWARFUnit *GetCompileUnit() const { return m_cu; }
+  void SetCompileUnit(const DWARFUnit *cu) { m_cu = cu; }
   dw_form_t Form() const { return m_form; }
   void SetForm(dw_form_t form) { m_form = form; }
   const ValueType &Value() const { return m_value; }
@@ -79,7 +79,7 @@ public:
                  lldb::offset_t *offset_ptr) const;
   static bool SkipValue(const dw_form_t form,
                         const lldb_private::DWARFDataExtractor &debug_info_data,
-                        lldb::offset_t *offset_ptr, const DWARFCompileUnit *cu);
+                        lldb::offset_t *offset_ptr, const DWARFUnit *cu);
   static bool IsBlockForm(const dw_form_t form);
   static bool IsDataForm(const dw_form_t form);
   static FixedFormSizes GetFixedFormSizesForAddressSize(uint8_t addr_size,
@@ -89,7 +89,7 @@ public:
   static bool FormIsSupported(dw_form_t form);
 
 protected:
-  const DWARFCompileUnit *m_cu; // Compile unit for this form
+  const DWARFUnit *m_cu;        // Compile unit for this form
   dw_form_t m_form;             // Form for this value
   ValueType m_value;            // Contains all data for the form
 };

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp Sun Mar 18 13:11:02 2018
@@ -154,7 +154,7 @@ DWARFUnit::GetDIE(dw_offset_t die_offset
           Data().m_die_array.begin(), end, die_offset, CompareDIEOffset);
       if (pos != end) {
         if (die_offset == (*pos).GetOffset())
-          return DWARFDIE(&Data(), &(*pos));
+          return DWARFDIE(this, &(*pos));
       }
     } else {
       // Don't specify the compile unit offset as we don't know it because the
@@ -364,7 +364,7 @@ void DWARFUnit::IndexPrivate(
 
     DWARFFormValue specification_die_form;
     const size_t num_attributes =
-        die.GetAttributes(&dwarf_cu->Data(), fixed_form_sizes, attributes);
+        die.GetAttributes(dwarf_cu, fixed_form_sizes, attributes);
     if (num_attributes > 0) {
       for (uint32_t i = 0; i < num_attributes; ++i) {
         dw_attr_t attr = attributes.AttributeAtIndex(i);

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.h Sun Mar 18 13:11:02 2018
@@ -31,6 +31,8 @@ enum DWARFProducer {
 };
 
 class DWARFUnit {
+  friend class DWARFCompileUnit;
+
 public:
   virtual ~DWARFUnit();
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Sun Mar 18 13:11:02 2018
@@ -58,7 +58,7 @@
 
 #include "DWARFASTParser.h"
 #include "DWARFASTParserClang.h"
-#include "DWARFCompileUnit.h"
+#include "DWARFUnit.h"
 #include "DWARFDIECollection.h"
 #include "DWARFDebugAbbrev.h"
 #include "DWARFDebugAranges.h"
@@ -208,7 +208,7 @@ static const char *resolveCompDir(const
   return nullptr;
 }
 
-DWARFCompileUnit *SymbolFileDWARF::GetBaseCompileUnit() {
+DWARFUnit *SymbolFileDWARF::GetBaseCompileUnit() {
   return nullptr;
 }
 
@@ -333,7 +333,7 @@ size_t SymbolFileDWARF::GetTypes(SymbolC
   TypeSet type_set;
 
   CompileUnit *comp_unit = NULL;
-  DWARFCompileUnit *dwarf_cu = NULL;
+  DWARFUnit *dwarf_cu = NULL;
   if (sc_scope)
     comp_unit = sc_scope->CalculateSymbolContextCompileUnit();
 
@@ -716,7 +716,7 @@ const DWARFDebugInfo *SymbolFileDWARF::D
   return m_info.get();
 }
 
-DWARFCompileUnit *
+DWARFUnit *
 SymbolFileDWARF::GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) {
   if (!comp_unit)
     return nullptr;
@@ -726,7 +726,7 @@ SymbolFileDWARF::GetDWARFCompileUnit(lld
     // Just a normal DWARF file whose user ID for the compile unit is
     // the DWARF offset itself
 
-    DWARFCompileUnit *dwarf_cu =
+    DWARFUnit *dwarf_cu =
         info->GetCompileUnit((dw_offset_t)comp_unit->GetID());
     if (dwarf_cu && dwarf_cu->GetUserData() == NULL)
       dwarf_cu->SetUserData(comp_unit);
@@ -753,7 +753,7 @@ const DWARFDebugRanges *SymbolFileDWARF:
   return m_ranges.get();
 }
 
-lldb::CompUnitSP SymbolFileDWARF::ParseCompileUnit(DWARFCompileUnit *dwarf_cu,
+lldb::CompUnitSP SymbolFileDWARF::ParseCompileUnit(DWARFUnit *dwarf_cu,
                                                    uint32_t cu_idx) {
   CompUnitSP cu_sp;
   if (dwarf_cu) {
@@ -792,7 +792,7 @@ lldb::CompUnitSP SymbolFileDWARF::ParseC
                 cu_file_spec.SetFile(remapped_file, false);
             }
 
-            LanguageType cu_language = DWARFCompileUnit::LanguageTypeFromDWARF(
+            LanguageType cu_language = DWARFUnit::LanguageTypeFromDWARF(
                 cu_die.GetAttributeValueAsUnsigned(DW_AT_language, 0));
 
             bool is_optimized = dwarf_cu->GetIsOptimized();
@@ -843,7 +843,7 @@ CompUnitSP SymbolFileDWARF::ParseCompile
   CompUnitSP cu_sp;
   DWARFDebugInfo *info = DebugInfo();
   if (info) {
-    DWARFCompileUnit *dwarf_cu = info->GetCompileUnitAtIndex(cu_idx);
+    DWARFUnit *dwarf_cu = info->GetCompileUnitAtIndex(cu_idx);
     if (dwarf_cu)
       cu_sp = ParseCompileUnit(dwarf_cu, cu_idx);
   }
@@ -876,7 +876,7 @@ bool SymbolFileDWARF::FixupAddress(Addre
 lldb::LanguageType
 SymbolFileDWARF::ParseCompileUnitLanguage(const SymbolContext &sc) {
   assert(sc.comp_unit);
-  DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
   if (dwarf_cu)
     return dwarf_cu->GetLanguageType();
   else
@@ -886,7 +886,7 @@ SymbolFileDWARF::ParseCompileUnitLanguag
 size_t SymbolFileDWARF::ParseCompileUnitFunctions(const SymbolContext &sc) {
   assert(sc.comp_unit);
   size_t functions_added = 0;
-  DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
   if (dwarf_cu) {
     DWARFDIECollection function_dies;
     const size_t num_functions =
@@ -907,7 +907,7 @@ size_t SymbolFileDWARF::ParseCompileUnit
 bool SymbolFileDWARF::ParseCompileUnitSupportFiles(
     const SymbolContext &sc, FileSpecList &support_files) {
   assert(sc.comp_unit);
-  DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
   if (dwarf_cu) {
     const DWARFDIE cu_die = dwarf_cu->GetCompileUnitDIEOnly();
 
@@ -931,7 +931,7 @@ bool SymbolFileDWARF::ParseCompileUnitSu
 
 bool SymbolFileDWARF::ParseCompileUnitIsOptimized(
     const lldb_private::SymbolContext &sc) {
-  DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
   if (dwarf_cu)
     return dwarf_cu->GetIsOptimized();
   return false;
@@ -941,7 +941,7 @@ bool SymbolFileDWARF::ParseImportedModul
     const lldb_private::SymbolContext &sc,
     std::vector<lldb_private::ConstString> &imported_modules) {
   assert(sc.comp_unit);
-  DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
   if (dwarf_cu) {
     if (ClangModulesDeclVendor::LanguageSupportsClangModules(
             sc.comp_unit->GetLanguage())) {
@@ -1022,7 +1022,7 @@ bool SymbolFileDWARF::ParseCompileUnitLi
   if (sc.comp_unit->GetLineTable() != NULL)
     return true;
 
-  DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
   if (dwarf_cu) {
     const DWARFDIE dwarf_cu_die = dwarf_cu->GetCompileUnitDIEOnly();
     if (dwarf_cu_die) {
@@ -1105,7 +1105,7 @@ SymbolFileDWARF::ParseDebugMacros(lldb::
 bool SymbolFileDWARF::ParseCompileUnitDebugMacros(const SymbolContext &sc) {
   assert(sc.comp_unit);
 
-  DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
   if (dwarf_cu == nullptr)
     return false;
 
@@ -1494,7 +1494,7 @@ Type *SymbolFileDWARF::ResolveType(const
 }
 
 CompileUnit *
-SymbolFileDWARF::GetCompUnitForDWARFCompUnit(DWARFCompileUnit *dwarf_cu,
+SymbolFileDWARF::GetCompUnitForDWARFCompUnit(DWARFUnit *dwarf_cu,
                                              uint32_t cu_idx) {
   // Check if the symbol vendor already knows about this compile unit?
   if (dwarf_cu->GetUserData() == NULL) {
@@ -1561,7 +1561,7 @@ SymbolFileDWARF::GetDIE(const DIERef &di
 
 std::unique_ptr<SymbolFileDWARFDwo>
 SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(
-    DWARFCompileUnit &dwarf_cu, const DWARFDebugInfoEntry &cu_die) {
+    DWARFUnit &dwarf_cu, const DWARFDebugInfoEntry &cu_die) {
   // If we are using a dSYM file, we never want the standard DWO files since
   // the -gmodules support uses the same DWO machanism to specify full debug
   // info files for modules.
@@ -1618,7 +1618,7 @@ void SymbolFileDWARF::UpdateExternalModu
 
   const uint32_t num_compile_units = GetNumCompileUnits();
   for (uint32_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx) {
-    DWARFCompileUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx);
+    DWARFUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx);
 
     const DWARFDIE die = dwarf_cu->GetCompileUnitDIEOnly();
     if (die && die.HasChildren() == false) {
@@ -1775,7 +1775,7 @@ uint32_t SymbolFileDWARF::ResolveSymbolC
         }
       } else {
         uint32_t cu_idx = DW_INVALID_INDEX;
-        DWARFCompileUnit *dwarf_cu =
+        DWARFUnit *dwarf_cu =
             debug_info->GetCompileUnit(cu_offset, &cu_idx);
         if (dwarf_cu) {
           sc.comp_unit = GetCompUnitForDWARFCompUnit(dwarf_cu, cu_idx);
@@ -1877,7 +1877,7 @@ uint32_t SymbolFileDWARF::ResolveSymbolC
     DWARFDebugInfo *debug_info = DebugInfo();
     if (debug_info) {
       uint32_t cu_idx;
-      DWARFCompileUnit *dwarf_cu = NULL;
+      DWARFUnit *dwarf_cu = NULL;
 
       for (cu_idx = 0;
            (dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx)) != NULL;
@@ -2024,7 +2024,7 @@ void SymbolFileDWARF::Index() {
                       &function_selector_index, &objc_class_selectors_index,
                       &global_index, &type_index,
                       &namespace_index](size_t cu_idx) {
-      DWARFCompileUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx);
+      DWARFUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx);
       if (dwarf_cu) {
         dwarf_cu->Index(
             function_basename_index[cu_idx], function_fullname_index[cu_idx],
@@ -2035,7 +2035,7 @@ void SymbolFileDWARF::Index() {
     };
 
     auto extract_fn = [debug_info, &clear_cu_dies](size_t cu_idx) {
-      DWARFCompileUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx);
+      DWARFUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx);
       if (dwarf_cu) {
         // dwarf_cu->ExtractDIEsIfNeeded(false) will return zero if the
         // DIEs for a compile unit have already been parsed.
@@ -2787,7 +2787,7 @@ void SymbolFileDWARF::GetMangledNamesFor
     num_comp_units = info->GetNumCompileUnits();
 
   for (uint32_t i = 0; i < num_comp_units; i++) {
-    DWARFCompileUnit *cu = info->GetCompileUnitAtIndex(i);
+    DWARFUnit *cu = info->GetCompileUnitAtIndex(i);
     if (cu == nullptr)
       continue;
 
@@ -3167,7 +3167,7 @@ SymbolFileDWARF::GetObjCClassSymbol(cons
 // DWARF file
 // if we are doing darwin DWARF in .o file debugging.
 bool SymbolFileDWARF::Supports_DW_AT_APPLE_objc_complete_type(
-    DWARFCompileUnit *cu) {
+    DWARFUnit *cu) {
   if (m_supports_DW_AT_APPLE_objc_complete_type == eLazyBoolCalculate) {
     m_supports_DW_AT_APPLE_objc_complete_type = eLazyBoolNo;
     if (cu && cu->Supports_DW_AT_APPLE_objc_complete_type())
@@ -3176,7 +3176,7 @@ bool SymbolFileDWARF::Supports_DW_AT_APP
       DWARFDebugInfo *debug_info = DebugInfo();
       const uint32_t num_compile_units = GetNumCompileUnits();
       for (uint32_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx) {
-        DWARFCompileUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx);
+        DWARFUnit *dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx);
         if (dwarf_cu != cu &&
             dwarf_cu->Supports_DW_AT_APPLE_objc_complete_type()) {
           m_supports_DW_AT_APPLE_objc_complete_type = eLazyBoolYes;
@@ -3604,7 +3604,7 @@ size_t SymbolFileDWARF::ParseTypes(const
 size_t SymbolFileDWARF::ParseFunctionBlocks(const SymbolContext &sc) {
   assert(sc.comp_unit && sc.function);
   size_t functions_added = 0;
-  DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
   if (dwarf_cu) {
     const dw_offset_t function_die_offset = sc.function->GetID();
     DWARFDIE function_die = dwarf_cu->GetDIE(function_die_offset);
@@ -3621,7 +3621,7 @@ size_t SymbolFileDWARF::ParseTypes(const
   // At least a compile unit must be valid
   assert(sc.comp_unit);
   size_t types_added = 0;
-  DWARFCompileUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
+  DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
   if (dwarf_cu) {
     if (sc.function) {
       dw_offset_t function_die_offset = sc.function->GetID();
@@ -3660,7 +3660,7 @@ size_t SymbolFileDWARF::ParseVariablesFo
         return num_variables;
       }
     } else if (sc.comp_unit) {
-      DWARFCompileUnit *dwarf_cu = info->GetCompileUnit(sc.comp_unit->GetID());
+      DWARFUnit *dwarf_cu = info->GetCompileUnit(sc.comp_unit->GetID());
 
       if (dwarf_cu == NULL)
         return 0;

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h Sun Mar 18 13:11:02 2018
@@ -272,19 +272,19 @@ public:
   HasForwardDeclForClangType(const lldb_private::CompilerType &compiler_type);
 
   lldb_private::CompileUnit *
-  GetCompUnitForDWARFCompUnit(DWARFCompileUnit *dwarf_cu,
+  GetCompUnitForDWARFCompUnit(DWARFUnit *dwarf_cu,
                               uint32_t cu_idx = UINT32_MAX);
 
   virtual size_t GetObjCMethodDIEOffsets(lldb_private::ConstString class_name,
                                          DIEArray &method_die_offsets);
 
-  bool Supports_DW_AT_APPLE_objc_complete_type(DWARFCompileUnit *cu);
+  bool Supports_DW_AT_APPLE_objc_complete_type(DWARFUnit *cu);
 
   lldb_private::DebugMacrosSP ParseDebugMacros(lldb::offset_t *offset);
 
   static DWARFDIE GetParentSymbolContextDIE(const DWARFDIE &die);
 
-  virtual lldb::CompUnitSP ParseCompileUnit(DWARFCompileUnit *dwarf_cu,
+  virtual lldb::CompUnitSP ParseCompileUnit(DWARFUnit *dwarf_cu,
                                             uint32_t cu_idx);
 
   virtual lldb_private::DWARFExpression::LocationListFormat
@@ -303,13 +303,13 @@ public:
   virtual DWARFDIE GetDIE(const DIERef &die_ref);
 
   virtual std::unique_ptr<SymbolFileDWARFDwo>
-  GetDwoSymbolFileForCompileUnit(DWARFCompileUnit &dwarf_cu,
+  GetDwoSymbolFileForCompileUnit(DWARFUnit &dwarf_cu,
                                  const DWARFDebugInfoEntry &cu_die);
 
   // For regular SymbolFileDWARF instances the method returns nullptr,
   // for the instances of the subclass SymbolFileDWARFDwo
   // the method returns a pointer to the base compile unit.
-  virtual DWARFCompileUnit *GetBaseCompileUnit();
+  virtual DWARFUnit *GetBaseCompileUnit();
 
 protected:
   typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb_private::Type *>
@@ -342,10 +342,10 @@ protected:
   DIEInDeclContext(const lldb_private::CompilerDeclContext *parent_decl_ctx,
                    const DWARFDIE &die);
 
-  virtual DWARFCompileUnit *
+  virtual DWARFUnit *
   GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit);
 
-  DWARFCompileUnit *GetNextUnparsedDWARFCompileUnit(DWARFCompileUnit *prev_cu);
+  DWARFUnit *GetNextUnparsedDWARFCompileUnit(DWARFUnit *prev_cu);
 
   bool GetFunction(const DWARFDIE &die, lldb_private::SymbolContext &sc);
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp Sun Mar 18 13:11:02 2018
@@ -14,14 +14,14 @@
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Utility/LLDBAssert.h"
 
-#include "DWARFCompileUnit.h"
+#include "DWARFUnit.h"
 #include "DWARFDebugInfo.h"
 
 using namespace lldb;
 using namespace lldb_private;
 
 SymbolFileDWARFDwo::SymbolFileDWARFDwo(ObjectFileSP objfile,
-                                       DWARFCompileUnit *dwarf_cu)
+                                       DWARFUnit *dwarf_cu)
     : SymbolFileDWARF(objfile.get()), m_obj_file_sp(objfile),
       m_base_dwarf_cu(dwarf_cu) {
   SetID(((lldb::user_id_t)dwarf_cu->GetOffset()) << 32);
@@ -52,7 +52,7 @@ void SymbolFileDWARFDwo::LoadSectionData
 }
 
 lldb::CompUnitSP
-SymbolFileDWARFDwo::ParseCompileUnit(DWARFCompileUnit *dwarf_cu,
+SymbolFileDWARFDwo::ParseCompileUnit(DWARFUnit *dwarf_cu,
                                      uint32_t cu_idx) {
   assert(GetCompileUnit() == dwarf_cu && "SymbolFileDWARFDwo::ParseCompileUnit "
                                          "called with incompatible compile "
@@ -60,7 +60,7 @@ SymbolFileDWARFDwo::ParseCompileUnit(DWA
   return GetBaseSymbolFile()->ParseCompileUnit(m_base_dwarf_cu, UINT32_MAX);
 }
 
-DWARFCompileUnit *SymbolFileDWARFDwo::GetCompileUnit() {
+DWARFUnit *SymbolFileDWARFDwo::GetCompileUnit() {
   // A clang module is found via a skeleton CU, but is not a proper DWO.
   // Clang modules have a .debug_info section instead of the *_dwo variant.
   if (auto *section_list = m_obj_file->GetSectionList(false))
@@ -76,7 +76,7 @@ DWARFCompileUnit *SymbolFileDWARFDwo::Ge
     return nullptr;
 }
 
-DWARFCompileUnit *
+DWARFUnit *
 SymbolFileDWARFDwo::GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) {
   return GetCompileUnit();
 }
@@ -122,7 +122,7 @@ lldb::TypeSP SymbolFileDWARFDwo::FindCom
       die, type_name, must_be_implementation);
 }
 
-DWARFCompileUnit *SymbolFileDWARFDwo::GetBaseCompileUnit() {
+DWARFUnit *SymbolFileDWARFDwo::GetBaseCompileUnit() {
   return m_base_dwarf_cu;
 }
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h Sun Mar 18 13:11:02 2018
@@ -18,16 +18,16 @@
 
 class SymbolFileDWARFDwo : public SymbolFileDWARF {
 public:
-  SymbolFileDWARFDwo(lldb::ObjectFileSP objfile, DWARFCompileUnit *dwarf_cu);
+  SymbolFileDWARFDwo(lldb::ObjectFileSP objfile, DWARFUnit *dwarf_cu);
 
   ~SymbolFileDWARFDwo() override = default;
 
-  lldb::CompUnitSP ParseCompileUnit(DWARFCompileUnit *dwarf_cu,
+  lldb::CompUnitSP ParseCompileUnit(DWARFUnit *dwarf_cu,
                                     uint32_t cu_idx) override;
 
-  DWARFCompileUnit *GetCompileUnit();
+  DWARFUnit *GetCompileUnit();
 
-  DWARFCompileUnit *
+  DWARFUnit *
   GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) override;
 
   lldb_private::DWARFExpression::LocationListFormat
@@ -43,12 +43,12 @@ public:
   GetDIE(const DIERef &die_ref) override;
 
   std::unique_ptr<SymbolFileDWARFDwo>
-  GetDwoSymbolFileForCompileUnit(DWARFCompileUnit &dwarf_cu,
+  GetDwoSymbolFileForCompileUnit(DWARFUnit &dwarf_cu,
                                  const DWARFDebugInfoEntry &cu_die) override {
     return nullptr;
   }
 
-  DWARFCompileUnit *GetBaseCompileUnit() override;
+  DWARFUnit *GetBaseCompileUnit() override;
 
 protected:
   void LoadSectionData(lldb::SectionType sect_type,
@@ -74,7 +74,7 @@ protected:
   SymbolFileDWARF *GetBaseSymbolFile();
 
   lldb::ObjectFileSP m_obj_file_sp;
-  DWARFCompileUnit *m_base_dwarf_cu;
+  DWARFUnit *m_base_dwarf_cu;
 };
 
 #endif // SymbolFileDWARFDwo_SymbolFileDWARFDwo_h_

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp Sun Mar 18 13:11:02 2018
@@ -14,7 +14,7 @@
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Utility/LLDBAssert.h"
 
-#include "DWARFCompileUnit.h"
+#include "DWARFUnit.h"
 #include "DWARFDebugInfo.h"
 
 using namespace lldb;
@@ -22,7 +22,7 @@ using namespace lldb_private;
 
 SymbolFileDWARFDwoDwp::SymbolFileDWARFDwoDwp(SymbolFileDWARFDwp *dwp_symfile,
                                              ObjectFileSP objfile,
-                                             DWARFCompileUnit *dwarf_cu,
+                                             DWARFUnit *dwarf_cu,
                                              uint64_t dwo_id)
     : SymbolFileDWARFDwo(objfile, dwarf_cu), m_dwp_symfile(dwp_symfile),
       m_dwo_id(dwo_id) {}

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h Sun Mar 18 13:11:02 2018
@@ -20,7 +20,7 @@
 class SymbolFileDWARFDwoDwp : public SymbolFileDWARFDwo {
 public:
   SymbolFileDWARFDwoDwp(SymbolFileDWARFDwp *dwp_symfile,
-                        lldb::ObjectFileSP objfile, DWARFCompileUnit *dwarf_cu,
+                        lldb::ObjectFileSP objfile, DWARFUnit *dwarf_cu,
                         uint64_t dwo_id);
 
 protected:

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.cpp Sun Mar 18 13:11:02 2018
@@ -85,7 +85,7 @@ SymbolFileDWARFDwp::SymbolFileDWARFDwp(l
 {}
 
 std::unique_ptr<SymbolFileDWARFDwo>
-SymbolFileDWARFDwp::GetSymbolFileForDwoId(DWARFCompileUnit *dwarf_cu,
+SymbolFileDWARFDwp::GetSymbolFileForDwoId(DWARFUnit *dwarf_cu,
                                           uint64_t dwo_id) {
   return std::unique_ptr<SymbolFileDWARFDwo>(
       new SymbolFileDWARFDwoDwp(this, m_obj_file, dwarf_cu, dwo_id));

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h?rev=327810&r1=327809&r2=327810&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwp.h Sun Mar 18 13:11:02 2018
@@ -29,7 +29,7 @@ public:
   Create(lldb::ModuleSP module_sp, const lldb_private::FileSpec &file_spec);
 
   std::unique_ptr<SymbolFileDWARFDwo>
-  GetSymbolFileForDwoId(DWARFCompileUnit *dwarf_cu, uint64_t dwo_id);
+  GetSymbolFileForDwoId(DWARFUnit *dwarf_cu, uint64_t dwo_id);
 
   bool LoadSectionData(uint64_t dwo_id, lldb::SectionType sect_type,
                        lldb_private::DWARFDataExtractor &data);




More information about the lldb-commits mailing list