mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 15:36:58 +00:00
Make llvm::telemetry::Manager::preDispatch protected. (#127114)
The method was meant to be overriden by subclasses only. It should not be called directly by users
This commit is contained in:
parent
4aeb2f1c79
commit
f7a2d70bd9
@ -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 @@ public:
|
||||
// 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) {}
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<Destination>> Destinations;
|
||||
};
|
||||
|
@ -1,3 +1,16 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// 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
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
///
|
||||
/// \file
|
||||
/// This file provides the basic framework for Telemetry.
|
||||
/// Refer to its documentation at llvm/docs/Telemetry.rst for more details.
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Telemetry/Telemetry.h"
|
||||
|
||||
namespace llvm {
|
||||
|
Loading…
x
Reference in New Issue
Block a user