Skip to content

[llvm] annotate remaining Telemetry and ToolDrivers interfaces for DLL export #145369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions llvm/include/llvm/Telemetry/Telemetry.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Error.h"
#include <map>
#include <memory>
Expand Down Expand Up @@ -101,7 +102,7 @@ struct EntryKind {
/// For example, The LLDB debugger can define a DebugCommandInfo subclass
/// which has additional fields about the debug-command being instrumented,
/// such as `CommandArguments` or `CommandName`.
struct TelemetryInfo {
struct LLVM_ABI TelemetryInfo {
// This represents a unique-id, conventionally corresponding to
// a tool's session - i.e., every time the tool starts until it exits.
//
Expand Down Expand Up @@ -141,10 +142,15 @@ class Destination {
/// and this framework.
/// It is responsible for collecting telemetry data from the tool being
/// monitored and transmitting the data elsewhere.
class Manager {
class LLVM_ABI Manager {
public:
Manager() = default;
virtual ~Manager() = default;

// Explicitly non-copyable.
Manager(Manager const &) = delete;
Manager &operator=(Manager const &) = delete;

// Dispatch Telemetry data to the Destination(s).
// The argument is non-const because the Manager may add or remove
// data from the entry.
Expand Down
4 changes: 3 additions & 1 deletion llvm/include/llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
#ifndef LLVM_TOOLDRIVERS_LLVM_DLLTOOL_DLLTOOLDRIVER_H
#define LLVM_TOOLDRIVERS_LLVM_DLLTOOL_DLLTOOLDRIVER_H

#include "llvm/Support/Compiler.h"

namespace llvm {
template <typename T> class ArrayRef;

int dlltoolDriverMain(ArrayRef<const char *> ArgsArr);
LLVM_ABI int dlltoolDriverMain(ArrayRef<const char *> ArgsArr);
} // namespace llvm

#endif
5 changes: 3 additions & 2 deletions llvm/include/llvm/ToolDrivers/llvm-lib/LibDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
#ifndef LLVM_TOOLDRIVERS_LLVM_LIB_LIBDRIVER_H
#define LLVM_TOOLDRIVERS_LLVM_LIB_LIBDRIVER_H

#include "llvm/Support/Compiler.h"

namespace llvm {
template <typename T> class ArrayRef;

int libDriverMain(ArrayRef<const char *> ARgs);

LLVM_ABI int libDriverMain(ArrayRef<const char *> ARgs);
}

#endif