================
@@ -0,0 +1,61 @@
+//===-- WatchpointResourceList.cpp 
----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Target/WatchpointResourceList.h"
+#include "lldb/Target/WatchpointResource.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+WatchpointResourceList::WatchpointResourceList() : m_resources(), m_mutex() {}
+
+WatchpointResourceList::~WatchpointResourceList() { Clear(); }
+
+uint32_t WatchpointResourceList::GetSize() {
+  std::lock_guard<std::mutex> guard(m_mutex);
+  return m_resources.size();
+}
+
+lldb::WatchpointResourceSP
+WatchpointResourceList::GetResourceAtIndex(uint32_t idx) {
+  std::lock_guard<std::mutex> guard(m_mutex);
+  if (idx < m_resources.size()) {
+    return m_resources[idx];
+  } else {
+    return {};
----------------
DavidSpickett wrote:

Single line ifs.

https://github.com/llvm/llvm-project/pull/68845
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to