[ukm-builders] constexprs need definitions.
Until C++17 a static constexpr member variable needs a definition. Without this, kEntryNameHash members and similar metrics name hashes can't be odr-used (ill-defined). So now generated UKM builders .cc files will go from (only modified snippet shown for a sample event): const char Identifiability::kEntryName[] = "Identifiability"; to: const char Identifiability::kEntryName[] = "Identifiability"; const uint64_t kEntryNameHash; And similarly for metrics hashes. While we are here, this CL cleans up the include header so that it doesn't include a double //. I.e. This: #include "services/metrics/public/cpp//ukm_builders.h" Becomes this: #include "services/metrics/public/cpp/ukm_builders.h" Bug: 973801 Change-Id: Icfd234ef953f2cefee5376803be266a2321df020 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203767Reviewed-by:Robert Kaplow <rkaplow@chromium.org> Commit-Queue: Asanka Herath <asanka@chromium.org> Cr-Commit-Position: refs/heads/master@{#770780}
Showing
Please register or sign in to comment