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/API/SBValueList.cpp b/lldb/source/API/SBValueList.cpp
index b03b86e..69af083 100644
--- a/lldb/source/API/SBValueList.cpp
+++ b/lldb/source/API/SBValueList.cpp
@@ -67,77 +67,77 @@
std::vector<lldb::SBValue> m_values;
};
-SBValueList::SBValueList() : m_opaque_ap() {}
+SBValueList::SBValueList() : m_opaque_up() {}
-SBValueList::SBValueList(const SBValueList &rhs) : m_opaque_ap() {
+SBValueList::SBValueList(const SBValueList &rhs) : m_opaque_up() {
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
if (rhs.IsValid())
- m_opaque_ap.reset(new ValueListImpl(*rhs));
+ m_opaque_up.reset(new ValueListImpl(*rhs));
if (log) {
log->Printf(
"SBValueList::SBValueList (rhs.ap=%p) => this.ap = %p",
- static_cast<void *>(rhs.IsValid() ? rhs.m_opaque_ap.get() : NULL),
- static_cast<void *>(m_opaque_ap.get()));
+ static_cast<void *>(rhs.IsValid() ? rhs.m_opaque_up.get() : NULL),
+ static_cast<void *>(m_opaque_up.get()));
}
}
-SBValueList::SBValueList(const ValueListImpl *lldb_object_ptr) : m_opaque_ap() {
+SBValueList::SBValueList(const ValueListImpl *lldb_object_ptr) : m_opaque_up() {
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
if (lldb_object_ptr)
- m_opaque_ap.reset(new ValueListImpl(*lldb_object_ptr));
+ m_opaque_up.reset(new ValueListImpl(*lldb_object_ptr));
if (log) {
log->Printf("SBValueList::SBValueList (lldb_object_ptr=%p) => this.ap = %p",
static_cast<const void *>(lldb_object_ptr),
- static_cast<void *>(m_opaque_ap.get()));
+ static_cast<void *>(m_opaque_up.get()));
}
}
SBValueList::~SBValueList() {}
-bool SBValueList::IsValid() const { return (m_opaque_ap != NULL); }
+bool SBValueList::IsValid() const { return (m_opaque_up != NULL); }
-void SBValueList::Clear() { m_opaque_ap.reset(); }
+void SBValueList::Clear() { m_opaque_up.reset(); }
const SBValueList &SBValueList::operator=(const SBValueList &rhs) {
if (this != &rhs) {
if (rhs.IsValid())
- m_opaque_ap.reset(new ValueListImpl(*rhs));
+ m_opaque_up.reset(new ValueListImpl(*rhs));
else
- m_opaque_ap.reset();
+ m_opaque_up.reset();
}
return *this;
}
-ValueListImpl *SBValueList::operator->() { return m_opaque_ap.get(); }
+ValueListImpl *SBValueList::operator->() { return m_opaque_up.get(); }
-ValueListImpl &SBValueList::operator*() { return *m_opaque_ap; }
+ValueListImpl &SBValueList::operator*() { return *m_opaque_up; }
const ValueListImpl *SBValueList::operator->() const {
- return m_opaque_ap.get();
+ return m_opaque_up.get();
}
-const ValueListImpl &SBValueList::operator*() const { return *m_opaque_ap; }
+const ValueListImpl &SBValueList::operator*() const { return *m_opaque_up; }
void SBValueList::Append(const SBValue &val_obj) {
CreateIfNeeded();
- m_opaque_ap->Append(val_obj);
+ m_opaque_up->Append(val_obj);
}
void SBValueList::Append(lldb::ValueObjectSP &val_obj_sp) {
if (val_obj_sp) {
CreateIfNeeded();
- m_opaque_ap->Append(SBValue(val_obj_sp));
+ m_opaque_up->Append(SBValue(val_obj_sp));
}
}
void SBValueList::Append(const lldb::SBValueList &value_list) {
if (value_list.IsValid()) {
CreateIfNeeded();
- m_opaque_ap->Append(*value_list);
+ m_opaque_up->Append(*value_list);
}
}
@@ -149,15 +149,15 @@
// idx);
SBValue sb_value;
- if (m_opaque_ap)
- sb_value = m_opaque_ap->GetValueAtIndex(idx);
+ if (m_opaque_up)
+ sb_value = m_opaque_up->GetValueAtIndex(idx);
if (log) {
SBStream sstr;
sb_value.GetDescription(sstr);
log->Printf("SBValueList::GetValueAtIndex (this.ap=%p, idx=%d) => SBValue "
"(this.sp = %p, '%s')",
- static_cast<void *>(m_opaque_ap.get()), idx,
+ static_cast<void *>(m_opaque_up.get()), idx,
static_cast<void *>(sb_value.GetSP().get()), sstr.GetData());
}
@@ -171,38 +171,38 @@
// log->Printf ("SBValueList::GetSize ()");
uint32_t size = 0;
- if (m_opaque_ap)
- size = m_opaque_ap->GetSize();
+ if (m_opaque_up)
+ size = m_opaque_up->GetSize();
if (log)
log->Printf("SBValueList::GetSize (this.ap=%p) => %d",
- static_cast<void *>(m_opaque_ap.get()), size);
+ static_cast<void *>(m_opaque_up.get()), size);
return size;
}
void SBValueList::CreateIfNeeded() {
- if (m_opaque_ap == NULL)
- m_opaque_ap.reset(new ValueListImpl());
+ if (m_opaque_up == NULL)
+ m_opaque_up.reset(new ValueListImpl());
}
SBValue SBValueList::FindValueObjectByUID(lldb::user_id_t uid) {
SBValue sb_value;
- if (m_opaque_ap)
- sb_value = m_opaque_ap->FindValueByUID(uid);
+ if (m_opaque_up)
+ sb_value = m_opaque_up->FindValueByUID(uid);
return sb_value;
}
SBValue SBValueList::GetFirstValueByName(const char *name) const {
SBValue sb_value;
- if (m_opaque_ap)
- sb_value = m_opaque_ap->GetFirstValueByName(name);
+ if (m_opaque_up)
+ sb_value = m_opaque_up->GetFirstValueByName(name);
return sb_value;
}
-void *SBValueList::opaque_ptr() { return m_opaque_ap.get(); }
+void *SBValueList::opaque_ptr() { return m_opaque_up.get(); }
ValueListImpl &SBValueList::ref() {
CreateIfNeeded();
- return *m_opaque_ap;
+ return *m_opaque_up;
}