Skip to content

Commit c0a8d47

Browse files
committed
make field constexpr
1 parent 409636e commit c0a8d47

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/include/llvm/Telemetry/Telemetry.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ class Serializer {
6464
/// This struct can be extended as needed to add additional configuration
6565
/// points specific to a vendor's implementation.
6666
struct Config {
67-
static const bool BuildTimeEnableTelemetry = LLVM_ENABLE_TELEMETRY;
68-
virtual ~Config() : EnableTelemetry(BuildTimeEnableTelemetry) {}
67+
static constexpr bool BuildTimeEnableTelemetry = LLVM_ENABLE_TELEMETRY;
6968

7069
// If true, telemetry will be enabled.
7170
const bool EnableTelemetry;
7271

72+
virtual Config() : EnableTelemetry(BuildTimeEnableTelemetry) {}
73+
7374
// Telemetry can only be enabled if both the runtime and buildtime flag
7475
// are set.
7576
explicit Config(bool E) : EnableTelemetry(E && BuildTimeEnableTelemetry) {}

0 commit comments

Comments
 (0)