summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/File.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-02-13 06:25:41 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-02-13 06:25:41 +0000
commitd5b440369dbb0d41e6ecd47d6ac7410201e27f17 (patch)
tree4dc2e3c44bcd3e14143715fa86584862b2290f9f /lldb/source/Host/common/File.cpp
parent5cf777e41387c84518a9ff2ec1222058daf54e58 (diff)
downloadbcm5719-llvm-d5b440369dbb0d41e6ecd47d6ac7410201e27f17.tar.gz
bcm5719-llvm-d5b440369dbb0d41e6ecd47d6ac7410201e27f17.zip
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
Diffstat (limited to 'lldb/source/Host/common/File.cpp')
-rw-r--r--lldb/source/Host/common/File.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp
index 04fbf17ff6e..bf462135afa 100644
--- a/lldb/source/Host/common/File.cpp
+++ b/lldb/source/Host/common/File.cpp
@@ -528,18 +528,18 @@ Status File::Read(size_t &num_bytes, off_t &offset, bool null_terminate,
num_bytes = bytes_left;
size_t num_bytes_plus_nul_char = num_bytes + (null_terminate ? 1 : 0);
- std::unique_ptr<DataBufferHeap> data_heap_ap;
- data_heap_ap.reset(new DataBufferHeap());
- data_heap_ap->SetByteSize(num_bytes_plus_nul_char);
+ std::unique_ptr<DataBufferHeap> data_heap_up;
+ data_heap_up.reset(new DataBufferHeap());
+ data_heap_up->SetByteSize(num_bytes_plus_nul_char);
- if (data_heap_ap) {
- error = Read(data_heap_ap->GetBytes(), num_bytes, offset);
+ if (data_heap_up) {
+ error = Read(data_heap_up->GetBytes(), num_bytes, offset);
if (error.Success()) {
// Make sure we read exactly what we asked for and if we got
// less, adjust the array
- if (num_bytes_plus_nul_char < data_heap_ap->GetByteSize())
- data_heap_ap->SetByteSize(num_bytes_plus_nul_char);
- data_buffer_sp.reset(data_heap_ap.release());
+ if (num_bytes_plus_nul_char < data_heap_up->GetByteSize())
+ data_heap_up->SetByteSize(num_bytes_plus_nul_char);
+ data_buffer_sp.reset(data_heap_up.release());
return error;
}
}
OpenPOWER on IntegriCloud