[llvm] Make llvm::telemetry::Manager::preDispatch protected. (PR #127114)
Vy Nguyen via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 13 11:33:17 PST 2025
https://github.com/oontvoo created https://github.com/llvm/llvm-project/pull/127114
The method was meant to be overriden by subclasses only.
It should not be called directly by users
>From cabc961038d19eb19536248872f799ce7bc70a33 Mon Sep 17 00:00:00 2001
From: Vy Nguyen <vyng at google.com>
Date: Thu, 13 Feb 2025 14:31:45 -0500
Subject: [PATCH] make llvm::telemetry::Manager::preDispatch protected. It
should not be called directly by users
---
llvm/include/llvm/Telemetry/Telemetry.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/llvm/include/llvm/Telemetry/Telemetry.h b/llvm/include/llvm/Telemetry/Telemetry.h
index 344a49df5cbf0..fc9169caacb4f 100644
--- a/llvm/include/llvm/Telemetry/Telemetry.h
+++ b/llvm/include/llvm/Telemetry/Telemetry.h
@@ -138,10 +138,6 @@ class Manager {
public:
virtual ~Manager() = default;
- // Optional callback for subclasses to perform additional tasks before
- // dispatching to Destinations.
- virtual Error preDispatch(TelemetryInfo *Entry) = 0;
-
// Dispatch Telemetry data to the Destination(s).
// The argument is non-const because the Manager may add or remove
// data from the entry.
@@ -150,6 +146,11 @@ class Manager {
// Register a Destination.
void addDestination(std::unique_ptr<Destination> Destination);
+protected:
+ // Optional callback for subclasses to perform additional tasks before
+ // dispatching to Destinations.
+ virtual Error preDispatch(TelemetryInfo *Entry) = 0;
+
private:
std::vector<std::unique_ptr<Destination>> Destinations;
};
More information about the llvm-commits
mailing list