summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
diff options
context:
space:
mode:
authorKonrad Kleine <kkleine@redhat.com>2019-05-23 11:14:47 +0000
committerKonrad Kleine <kkleine@redhat.com>2019-05-23 11:14:47 +0000
commit248a13057a4adbdb8d511b1458daf39d01a4b520 (patch)
tree1209fb0822f0c14237eb9935e30da465014a6eda /lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
parent32d976bac194d78656974e3e05bf52997a06f509 (diff)
downloadbcm5719-llvm-248a13057a4adbdb8d511b1458daf39d01a4b520.tar.gz
bcm5719-llvm-248a13057a4adbdb8d511b1458daf39d01a4b520.zip
[lldb] NFC modernize codebase with modernize-use-nullptr
Summary: NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]] This commit is the result of modernizing the LLDB codebase by using `nullptr` instread of `0` or `NULL`. See https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html for more information. This is the command I ran and I to fix and format the code base: ``` run-clang-tidy.py \ -header-filter='.*' \ -checks='-*,modernize-use-nullptr' \ -fix ~/dev/llvm-project/lldb/.* \ -format \ -style LLVM \ -p ~/llvm-builds/debug-ninja-gcc ``` NOTE: There were also changes to `llvm/utils/unittest` but I did not include them because I felt that maybe this library shall be updated in isolation somehow. NOTE: I know this is a rather large commit but it is a nobrainer in most parts. Reviewers: martong, espindola, shafik, #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits Tags: #lldb, #llvm Differential Revision: https://reviews.llvm.org/D61847 llvm-svn: 361484
Diffstat (limited to 'lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp')
-rw-r--r--lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
index 82be85699b2..91a60b17fc9 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
@@ -70,7 +70,7 @@ SystemRuntime *SystemRuntimeMacOSX::CreateInstance(Process *process) {
if (create)
return new SystemRuntimeMacOSX(process);
- return NULL;
+ return nullptr;
}
// Constructor
@@ -106,7 +106,7 @@ void SystemRuntimeMacOSX::Clear(bool clear_process) {
m_process->ClearBreakpointSiteByID(m_break_id);
if (clear_process)
- m_process = NULL;
+ m_process = nullptr;
m_break_id = LLDB_INVALID_BREAK_ID;
}
@@ -266,7 +266,7 @@ void SystemRuntimeMacOSX::ReadLibdispatchOffsetsAddress() {
static ConstString g_dispatch_queue_offsets_symbol_name(
"dispatch_queue_offsets");
- const Symbol *dispatch_queue_offsets_symbol = NULL;
+ const Symbol *dispatch_queue_offsets_symbol = nullptr;
// libdispatch symbols were in libSystem.B.dylib up through Mac OS X 10.6
// ("Snow Leopard")
@@ -279,7 +279,7 @@ void SystemRuntimeMacOSX::ReadLibdispatchOffsetsAddress() {
// libdispatch symbols are in their own dylib as of Mac OS X 10.7 ("Lion")
// and later
- if (dispatch_queue_offsets_symbol == NULL) {
+ if (dispatch_queue_offsets_symbol == nullptr) {
ModuleSpec libdispatch_module_spec(FileSpec("libdispatch.dylib"));
module_sp = m_process->GetTarget().GetImages().FindFirstModule(
libdispatch_module_spec);
@@ -322,7 +322,7 @@ void SystemRuntimeMacOSX::ReadLibpthreadOffsetsAddress() {
static ConstString g_libpthread_layout_offsets_symbol_name(
"pthread_layout_offsets");
- const Symbol *libpthread_layout_offsets_symbol = NULL;
+ const Symbol *libpthread_layout_offsets_symbol = nullptr;
ModuleSpec libpthread_module_spec(FileSpec("libsystem_pthread.dylib"));
ModuleSP module_sp(m_process->GetTarget().GetImages().FindFirstModule(
@@ -370,7 +370,7 @@ void SystemRuntimeMacOSX::ReadLibdispatchTSDIndexesAddress() {
static ConstString g_libdispatch_tsd_indexes_symbol_name(
"dispatch_tsd_indexes");
- const Symbol *libdispatch_tsd_indexes_symbol = NULL;
+ const Symbol *libdispatch_tsd_indexes_symbol = nullptr;
ModuleSpec libpthread_module_spec(FileSpec("libdispatch.dylib"));
ModuleSP module_sp(m_process->GetTarget().GetImages().FindFirstModule(
@@ -726,7 +726,8 @@ void SystemRuntimeMacOSX::PopulateQueueList(
for (ThreadSP thread_sp : m_process->Threads()) {
if (thread_sp->GetAssociatedWithLibdispatchQueue() != eLazyBoolNo) {
if (thread_sp->GetQueueID() != LLDB_INVALID_QUEUE_ID) {
- if (queue_list.FindQueueByID(thread_sp->GetQueueID()).get() == NULL) {
+ if (queue_list.FindQueueByID(thread_sp->GetQueueID()).get() ==
+ nullptr) {
QueueSP queue_sp(new Queue(m_process->shared_from_this(),
thread_sp->GetQueueID(),
thread_sp->GetQueueName()));
@@ -933,7 +934,7 @@ void SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR(
offset = start_of_this_item +
m_lib_backtrace_recording_info.queue_info_data_offset;
const char *queue_label = extractor.GetCStr(&offset);
- if (queue_label == NULL)
+ if (queue_label == nullptr)
queue_label = "";
offset_t start_of_next_item = start_of_this_item + offset_to_next;
OpenPOWER on IntegriCloud