From cd891b0e8a000825647a289ec620cbb4d1704bf0 Mon Sep 17 00:00:00 2001
From: Stephane Sezer <sas@fb.com>
Date: Sun, 20 Apr 2014 18:20:32 -0700
Subject: [PATCH] Rename CompUnitSP to CompileUnitSP.

This change is just for the sake of uniformity. All the shared pointer typedefs
are named <NameOfType>SP. The base type being CompileUnit, CompUnitSP was one
major exception to that rule.
---
 include/lldb/Core/Module.h                                  |  2 +-
 include/lldb/Symbol/SymbolFile.h                            |  2 +-
 include/lldb/Symbol/SymbolVendor.h                          |  6 +++---
 include/lldb/lldb-forward.h                                 |  2 +-
 source/API/SBModule.cpp                                     |  2 +-
 source/Breakpoint/BreakpointResolverFileLine.cpp            |  2 +-
 source/Core/Module.cpp                                      |  4 ++--
 source/Core/SearchFilter.cpp                                |  4 ++--
 source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp         |  8 ++++----
 source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h           |  6 +++---
 source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | 10 +++++-----
 source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h   |  8 ++++----
 source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp       |  4 ++--
 source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h         |  2 +-
 source/Symbol/SymbolVendor.cpp                              |  6 +++---
 15 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/include/lldb/Core/Module.h b/include/lldb/Core/Module.h
index f6491db..c5481d7 100644
--- a/include/lldb/Core/Module.h
+++ b/include/lldb/Core/Module.h
@@ -660,7 +660,7 @@ public:
     size_t
     GetNumCompileUnits();
 
-    lldb::CompUnitSP
+    lldb::CompileUnitSP
     GetCompileUnitAtIndex (size_t idx);
 
     const ConstString &
diff --git a/include/lldb/Symbol/SymbolFile.h b/include/lldb/Symbol/SymbolFile.h
index 5b774e3..3d1d900 100644
--- a/include/lldb/Symbol/SymbolFile.h
+++ b/include/lldb/Symbol/SymbolFile.h
@@ -118,7 +118,7 @@ public:
     //------------------------------------------------------------------
     // Approach 1 - iterator
     virtual uint32_t        GetNumCompileUnits() = 0;
-    virtual lldb::CompUnitSP  ParseCompileUnitAtIndex(uint32_t index) = 0;
+    virtual lldb::CompileUnitSP ParseCompileUnitAtIndex(uint32_t index) = 0;
 
     virtual lldb::LanguageType ParseCompileUnitLanguage (const SymbolContext& sc) = 0;
     virtual size_t          ParseCompileUnitFunctions (const SymbolContext& sc) = 0;
diff --git a/include/lldb/Symbol/SymbolVendor.h b/include/lldb/Symbol/SymbolVendor.h
index 0eeea4e..db7a46c 100644
--- a/include/lldb/Symbol/SymbolVendor.h
+++ b/include/lldb/Symbol/SymbolVendor.h
@@ -136,9 +136,9 @@ public:
 
     virtual bool
     SetCompileUnitAtIndex (size_t cu_idx,
-                           const lldb::CompUnitSP &cu_sp);
+                           const lldb::CompileUnitSP &cu_sp);
 
-    virtual lldb::CompUnitSP
+    virtual lldb::CompileUnitSP
     GetCompileUnitAtIndex(size_t idx);
 
     TypeList&
@@ -185,7 +185,7 @@ protected:
     //------------------------------------------------------------------
     // Classes that inherit from SymbolVendor can see and modify these
     //------------------------------------------------------------------
-    typedef std::vector<lldb::CompUnitSP> CompileUnits;
+    typedef std::vector<lldb::CompileUnitSP> CompileUnits;
     typedef CompileUnits::iterator CompileUnitIter;
     typedef CompileUnits::const_iterator CompileUnitConstIter;
 
diff --git a/include/lldb/lldb-forward.h b/include/lldb/lldb-forward.h
index f5539bc..0700e2e 100644
--- a/include/lldb/lldb-forward.h
+++ b/include/lldb/lldb-forward.h
@@ -291,7 +291,7 @@ namespace lldb {
     typedef std::shared_ptr<lldb_private::CommandObject> CommandObjectSP;
     typedef std::shared_ptr<lldb_private::Communication> CommunicationSP;
     typedef std::shared_ptr<lldb_private::Connection> ConnectionSP;
-    typedef std::shared_ptr<lldb_private::CompileUnit> CompUnitSP;
+    typedef std::shared_ptr<lldb_private::CompileUnit> CompileUnitSP;
     typedef std::shared_ptr<lldb_private::DataBuffer> DataBufferSP;
     typedef std::shared_ptr<lldb_private::DataExtractor> DataExtractorSP;
     typedef std::shared_ptr<lldb_private::Debugger> DebuggerSP;
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index b1e39ff..58aec50 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -327,7 +327,7 @@ SBModule::GetCompileUnitAtIndex (uint32_t index)
     ModuleSP module_sp (GetSP ());
     if (module_sp)
     {
-        CompUnitSP cu_sp = module_sp->GetCompileUnitAtIndex (index);
+        CompileUnitSP cu_sp = module_sp->GetCompileUnitAtIndex (index);
         sb_cu.reset(cu_sp.get());
     }
     return sb_cu;
diff --git a/source/Breakpoint/BreakpointResolverFileLine.cpp b/source/Breakpoint/BreakpointResolverFileLine.cpp
index dcee2fd..e2722d5 100644
--- a/source/Breakpoint/BreakpointResolverFileLine.cpp
+++ b/source/Breakpoint/BreakpointResolverFileLine.cpp
@@ -75,7 +75,7 @@ BreakpointResolverFileLine::SearchCallback
     const size_t num_comp_units = context.module_sp->GetNumCompileUnits();
     for (size_t i = 0; i < num_comp_units; i++)
     {
-        CompUnitSP cu_sp (context.module_sp->GetCompileUnitAtIndex (i));
+        CompileUnitSP cu_sp (context.module_sp->GetCompileUnitAtIndex (i));
         if (cu_sp)
         {
             if (filter.CompUnitPasses(*cu_sp))
diff --git a/source/Core/Module.cpp b/source/Core/Module.cpp
index 4cf10e9..d0c4130 100644
--- a/source/Core/Module.cpp
+++ b/source/Core/Module.cpp
@@ -488,12 +488,12 @@ Module::GetNumCompileUnits()
     return 0;
 }
 
-CompUnitSP
+CompileUnitSP
 Module::GetCompileUnitAtIndex (size_t index)
 {
     Mutex::Locker locker (m_mutex);
     size_t num_comp_units = GetNumCompileUnits ();
-    CompUnitSP cu_sp;
+    CompileUnitSP cu_sp;
 
     if (index < num_comp_units)
     {
diff --git a/source/Core/SearchFilter.cpp b/source/Core/SearchFilter.cpp
index dee2f2e..06f5378 100644
--- a/source/Core/SearchFilter.cpp
+++ b/source/Core/SearchFilter.cpp
@@ -238,7 +238,7 @@ SearchFilter::DoCUIteration (const ModuleSP &module_sp, const SymbolContext &con
         const size_t num_comp_units = module_sp->GetNumCompileUnits();
         for (size_t i = 0; i < num_comp_units; i++)
         {
-            CompUnitSP cu_sp (module_sp->GetCompileUnitAtIndex (i));
+            CompileUnitSP cu_sp (module_sp->GetCompileUnitAtIndex (i));
             if (cu_sp)
             {
                 if (!CompUnitPasses (*(cu_sp.get())))
@@ -746,7 +746,7 @@ SearchFilterByModuleListAndCU::Search (Searcher &searcher)
                 const size_t num_cu = module_sp->GetNumCompileUnits();
                 for (size_t cu_idx = 0; cu_idx < num_cu; cu_idx++)
                 {
-                    CompUnitSP cu_sp = module_sp->GetCompileUnitAtIndex(cu_idx);
+                    CompileUnitSP cu_sp = module_sp->GetCompileUnitAtIndex(cu_idx);
                     matchingContext.comp_unit = cu_sp.get();
                     if (matchingContext.comp_unit)
                     {
diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index a9ea0e9..0e491f5 100644
--- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -898,10 +898,10 @@ SymbolFileDWARF::DebugRanges() const
     return m_ranges.get();
 }
 
-lldb::CompUnitSP
+lldb::CompileUnitSP
 SymbolFileDWARF::ParseCompileUnit (DWARFCompileUnit* dwarf_cu, uint32_t cu_idx)
 {
-    CompUnitSP cu_sp;
+    CompileUnitSP cu_sp;
     if (dwarf_cu)
     {
         CompileUnit *comp_unit = (CompileUnit*)dwarf_cu->GetUserData();
@@ -988,10 +988,10 @@ SymbolFileDWARF::GetNumCompileUnits()
     return 0;
 }
 
-CompUnitSP
+CompileUnitSP
 SymbolFileDWARF::ParseCompileUnitAtIndex(uint32_t cu_idx)
 {
-    CompUnitSP cu_sp;
+    CompileUnitSP cu_sp;
     DWARFDebugInfo* info = DebugInfo();
     if (info)
     {
diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index 178e514..7cd4c44 100644
--- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -96,7 +96,7 @@ public:
     // Compile Unit function calls
     //------------------------------------------------------------------
     virtual uint32_t        GetNumCompileUnits();
-    virtual lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index);
+    virtual lldb::CompileUnitSP ParseCompileUnitAtIndex(uint32_t index);
 
     virtual lldb::LanguageType ParseCompileUnitLanguage (const lldb_private::SymbolContext& sc);
     virtual size_t          ParseCompileUnitFunctions (const lldb_private::SymbolContext& sc);
@@ -197,7 +197,7 @@ public:
     // them with the module. This would only be done on demand if and only if
     // the compile units were needed.
     //virtual size_t        GetCompUnitCount() = 0;
-    //virtual CompUnitSP    GetCompUnitAtIndex(size_t cu_idx) = 0;
+    //virtual CompileUnitSP GetCompUnitAtIndex(size_t cu_idx) = 0;
 
     const lldb_private::DWARFDataExtractor&     get_debug_abbrev_data ();
     const lldb_private::DWARFDataExtractor&     get_debug_aranges_data ();
@@ -305,7 +305,7 @@ protected:
                                               const DWARFDebugInfoEntry* die);
 
     DISALLOW_COPY_AND_ASSIGN (SymbolFileDWARF);
-    lldb::CompUnitSP        ParseCompileUnit (DWARFCompileUnit* dwarf_cu, uint32_t cu_idx);
+    lldb::CompileUnitSP     ParseCompileUnit (DWARFCompileUnit* dwarf_cu, uint32_t cu_idx);
     DWARFCompileUnit*       GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit);
     DWARFCompileUnit*       GetNextUnparsedDWARFCompileUnit(DWARFCompileUnit* prev_cu);
     lldb_private::CompileUnit*      GetCompUnitForDWARFCompUnit(DWARFCompileUnit* dwarf_cu, uint32_t cu_idx = UINT32_MAX);
diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 90ecc1f..e24721e 100644
--- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -639,10 +639,10 @@ SymbolFileDWARFDebugMap::GetNumCompileUnits()
 }
 
 
-CompUnitSP
+CompileUnitSP
 SymbolFileDWARFDebugMap::ParseCompileUnitAtIndex(uint32_t cu_idx)
 {
-    CompUnitSP comp_unit_sp;
+    CompileUnitSP comp_unit_sp;
     const uint32_t cu_count = GetNumCompileUnits();
 
     if (cu_idx < cu_count)
@@ -1313,7 +1313,7 @@ SymbolFileDWARFDebugMap::GetPluginVersion()
     return 1;
 }
 
-lldb::CompUnitSP
+lldb::CompileUnitSP
 SymbolFileDWARFDebugMap::GetCompileUnit (SymbolFileDWARF *oso_dwarf)
 {
     if (oso_dwarf)
@@ -1332,7 +1332,7 @@ SymbolFileDWARFDebugMap::GetCompileUnit (SymbolFileDWARF *oso_dwarf)
         }
     }
     assert(!"this shouldn't happen");
-    return lldb::CompUnitSP();
+    return lldb::CompileUnitSP();
 }
 
 SymbolFileDWARFDebugMap::CompileUnitInfo *
@@ -1355,7 +1355,7 @@ SymbolFileDWARFDebugMap::GetCompileUnitInfo (SymbolFileDWARF *oso_dwarf)
 
 
 void
-SymbolFileDWARFDebugMap::SetCompileUnit (SymbolFileDWARF *oso_dwarf, const CompUnitSP &cu_sp)
+SymbolFileDWARFDebugMap::SetCompileUnit (SymbolFileDWARF *oso_dwarf, const CompileUnitSP &cu_sp)
 {
     if (oso_dwarf)
     {
diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
index 06330b9..1a4c71b 100644
--- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -64,7 +64,7 @@ public:
     // Compile Unit function calls
     //------------------------------------------------------------------
     virtual uint32_t        GetNumCompileUnits ();
-    virtual lldb::CompUnitSP ParseCompileUnitAtIndex (uint32_t index);
+    virtual lldb::CompileUnitSP ParseCompileUnitAtIndex (uint32_t index);
 
     virtual lldb::LanguageType ParseCompileUnitLanguage (const lldb_private::SymbolContext& sc);
     virtual size_t          ParseCompileUnitFunctions (const lldb_private::SymbolContext& sc);
@@ -155,7 +155,7 @@ protected:
         lldb_private::ConstString oso_path;
         lldb_private::TimeValue oso_mod_time;
         OSOInfoSP oso_sp;
-        lldb::CompUnitSP compile_unit_sp;
+        lldb::CompileUnitSP compile_unit_sp;
         uint32_t first_symbol_index;
         uint32_t last_symbol_index;
         uint32_t first_symbol_id;
@@ -253,9 +253,9 @@ protected:
 
 
     void
-    SetCompileUnit (SymbolFileDWARF *oso_dwarf, const lldb::CompUnitSP &cu_sp);
+    SetCompileUnit (SymbolFileDWARF *oso_dwarf, const lldb::CompileUnitSP &cu_sp);
 
-    lldb::CompUnitSP
+    lldb::CompileUnitSP
     GetCompileUnit (SymbolFileDWARF *oso_dwarf);
     
     CompileUnitInfo *
diff --git a/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp b/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
index c0ecd59..2febce6 100644
--- a/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
+++ b/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
@@ -150,10 +150,10 @@ SymbolFileSymtab::GetNumCompileUnits()
     return m_source_indexes.size();
 }
 
-CompUnitSP
+CompileUnitSP
 SymbolFileSymtab::ParseCompileUnitAtIndex(uint32_t idx)
 {
-    CompUnitSP cu_sp;
+    CompileUnitSP cu_sp;
 
     // If we don't have any source file symbols we will just have one compile unit for
     // the entire object file
diff --git a/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h b/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
index 914efe6..4996306 100644
--- a/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
+++ b/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
@@ -51,7 +51,7 @@ public:
     virtual uint32_t
     GetNumCompileUnits();
 
-    virtual lldb::CompUnitSP
+    virtual lldb::CompileUnitSP
     ParseCompileUnitAtIndex(uint32_t index);
 
     virtual lldb::LanguageType
diff --git a/source/Symbol/SymbolVendor.cpp b/source/Symbol/SymbolVendor.cpp
index 91cb94c..2ebb007 100644
--- a/source/Symbol/SymbolVendor.cpp
+++ b/source/Symbol/SymbolVendor.cpp
@@ -95,7 +95,7 @@ SymbolVendor::AddSymbolFileRepresentation(const ObjectFileSP &objfile_sp)
 }
 
 bool
-SymbolVendor::SetCompileUnitAtIndex (size_t idx, const CompUnitSP &cu_sp)
+SymbolVendor::SetCompileUnitAtIndex (size_t idx, const CompileUnitSP &cu_sp)
 {
     ModuleSP module_sp(GetModule());
     if (module_sp)
@@ -416,10 +416,10 @@ SymbolVendor::Dump(Stream *s)
     }
 }
 
-CompUnitSP
+CompileUnitSP
 SymbolVendor::GetCompileUnitAtIndex(size_t idx)
 {
-    CompUnitSP cu_sp;
+    CompileUnitSP cu_sp;
     ModuleSP module_sp(GetModule());
     if (module_sp)
     {
-- 
Stephane Sezer

