[Lldb-commits] [lldb] [lldb-server][Windows] add support for thread name (PR #199983)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Thu May 28 07:50:07 PDT 2026


================
@@ -0,0 +1,46 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_HOST_WINDOWS_LAZYIMPORT_H
+#define LLDB_HOST_WINDOWS_LAZYIMPORT_H
+
+#include "lldb/Host/windows/windows.h"
+
+namespace lldb_private {
+
+template <typename FnPtr> class LazyImport {
+public:
+  constexpr LazyImport(const wchar_t *dll, const char *symbol)
+      : m_dll(dll), m_symbol(symbol) {}
+
+  /// Returns the resolved function pointer, or nullptr if the DLL or symbol
+  /// is unavailable on this system. Resolution happens once.
+  FnPtr get() const {
+    static FnPtr resolved = Resolve(m_dll, m_symbol);
----------------
charles-zablit wrote:

I did not think of this. The latest patch removes the constexpr. The resolution is now done once, in the constructor.

https://github.com/llvm/llvm-project/pull/199983


More information about the lldb-commits mailing list