[Lldb-commits] [lldb] Define TelemetryVendor plugin. (PR #126588)
Vy Nguyen via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 12 07:08:34 PST 2025
================
@@ -0,0 +1,43 @@
+//===-- TelemetryVendor.h -------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+#ifdef LLDB_BUILD_TELEMETRY
+
+#ifndef LLDB_CORE_TELEMETRYVENDOR_H
+#define LLDB_CORE_TELEMETRYVENDOR_H
+
+#include "lldb/Core/PluginInterface.h"
+#include "lldb/Core/Telemetry.h"
+#include "llvm/Telemetry/Telemetry.h"
+
+#include <memory>
+
+namespace lldb_private {
+
+class TelemetryVendor : public PluginInterface {
+public:
+ TelemetryVendor() = default;
+
+ llvm::StringRef GetPluginName() override;
----------------
oontvoo wrote:
>From my understanding, this class is the main (and only) way for the rest of LLDB to obtain a `TelemetryManager` - that is, via `TelemetryVendor::GetTelemetryManager()` function, without worrying about picking the the right plugin class.
The downstream plugin will just call this class `TelemetryVendor::SetTelemetryManager` .
https://github.com/llvm/llvm-project/pull/126588
More information about the lldb-commits
mailing list