Replace 'ap' with 'up' suffix in variable names. (NFC)
The `ap` suffix is a remnant of lldb's former use of auto pointers,
before they got deprecated. Although all their uses were replaced by
unique pointers, some variables still carried the suffix.
In r353795 I removed another auto_ptr remnant, namely redundant calls to
::get for unique_pointers. Jim justly noted that this is a good
opportunity to clean up the variable names as well.
I went over all the changes to ensure my find-and-replace didn't have
any undesired side-effects. I hope I didn't miss any, but if you end up
at this commit doing a git blame on a weirdly named variable, please
know that the change was unintentional.
llvm-svn: 353912
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 24e5cfc..6a1e674 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -952,7 +952,7 @@
 
 struct ParseDWARFLineTableCallbackInfo {
   LineTable *line_table;
-  std::unique_ptr<LineSequence> sequence_ap;
+  std::unique_ptr<LineSequence> sequence_up;
   lldb::addr_t addr_mask;
 };
 
@@ -972,19 +972,19 @@
     LineTable *line_table = info->line_table;
 
     // If this is our first time here, we need to create a sequence container.
-    if (!info->sequence_ap) {
-      info->sequence_ap.reset(line_table->CreateLineSequenceContainer());
-      assert(info->sequence_ap.get());
+    if (!info->sequence_up) {
+      info->sequence_up.reset(line_table->CreateLineSequenceContainer());
+      assert(info->sequence_up.get());
     }
     line_table->AppendLineEntryToSequence(
-        info->sequence_ap.get(), state.address & info->addr_mask, state.line,
+        info->sequence_up.get(), state.address & info->addr_mask, state.line,
         state.column, state.file, state.is_stmt, state.basic_block,
         state.prologue_end, state.epilogue_begin, state.end_sequence);
     if (state.end_sequence) {
       // First, put the current sequence into the line table.
-      line_table->InsertSequence(info->sequence_ap.get());
+      line_table->InsertSequence(info->sequence_up.get());
       // Then, empty it to prepare for the next sequence.
-      info->sequence_ap->Clear();
+      info->sequence_up->Clear();
     }
   }
 }
@@ -1002,10 +1002,10 @@
           dwarf_cu_die.GetAttributeValueAsUnsigned(DW_AT_stmt_list,
                                                    DW_INVALID_OFFSET);
       if (cu_line_offset != DW_INVALID_OFFSET) {
-        std::unique_ptr<LineTable> line_table_ap(new LineTable(&comp_unit));
-        if (line_table_ap) {
+        std::unique_ptr<LineTable> line_table_up(new LineTable(&comp_unit));
+        if (line_table_up) {
           ParseDWARFLineTableCallbackInfo info;
-          info.line_table = line_table_ap.get();
+          info.line_table = line_table_up.get();
 
           /*
            * MIPS:
@@ -1038,9 +1038,9 @@
             // addresses that are relative to the .o file into addresses for
             // the main executable.
             comp_unit.SetLineTable(
-                debug_map_symfile->LinkOSOLineTable(this, line_table_ap.get()));
+                debug_map_symfile->LinkOSOLineTable(this, line_table_up.get()));
           } else {
-            comp_unit.SetLineTable(line_table_ap.release());
+            comp_unit.SetLineTable(line_table_up.release());
             return true;
           }
         }
@@ -1174,20 +1174,20 @@
 
         if (tag != DW_TAG_subprogram &&
             (name != NULL || mangled_name != NULL)) {
-          std::unique_ptr<Declaration> decl_ap;
+          std::unique_ptr<Declaration> decl_up;
           if (decl_file != 0 || decl_line != 0 || decl_column != 0)
-            decl_ap.reset(new Declaration(
+            decl_up.reset(new Declaration(
                 comp_unit.GetSupportFiles().GetFileSpecAtIndex(decl_file),
                 decl_line, decl_column));
 
-          std::unique_ptr<Declaration> call_ap;
+          std::unique_ptr<Declaration> call_up;
           if (call_file != 0 || call_line != 0 || call_column != 0)
-            call_ap.reset(new Declaration(
+            call_up.reset(new Declaration(
                 comp_unit.GetSupportFiles().GetFileSpecAtIndex(call_file),
                 call_line, call_column));
 
-          block->SetInlinedFunctionInfo(name, mangled_name, decl_ap.get(),
-                                        call_ap.get());
+          block->SetInlinedFunctionInfo(name, mangled_name, decl_up.get(),
+                                        call_up.get());
         }
 
         ++blocks_added;
@@ -1674,8 +1674,8 @@
 }
 
 SymbolFileDWARF::GlobalVariableMap &SymbolFileDWARF::GetGlobalAranges() {
-  if (!m_global_aranges_ap) {
-    m_global_aranges_ap.reset(new GlobalVariableMap());
+  if (!m_global_aranges_up) {
+    m_global_aranges_up.reset(new GlobalVariableMap());
 
     ModuleSP module_sp = GetObjectFile()->GetModule();
     if (module_sp) {
@@ -1702,7 +1702,7 @@
                     if (var_sp->GetType())
                       byte_size =
                           var_sp->GetType()->GetByteSize().getValueOr(0);
-                    m_global_aranges_ap->Append(GlobalVariableMap::Entry(
+                    m_global_aranges_up->Append(GlobalVariableMap::Entry(
                         file_addr, byte_size, var_sp.get()));
                   }
                 }
@@ -1712,9 +1712,9 @@
         }
       }
     }
-    m_global_aranges_ap->Sort();
+    m_global_aranges_up->Sort();
   }
-  return *m_global_aranges_ap;
+  return *m_global_aranges_up;
 }
 
 uint32_t SymbolFileDWARF::ResolveSymbolContext(const Address &so_addr,