summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-10-25 08:11:35 +0000
committerClement Courbet <courbet@google.com>2018-10-25 08:11:35 +0000
commitb4b6ec01c6d1c6f15da65c37be9ffa2482712e7f (patch)
treebfe4b3a2497cccb0b67adf461bc8737a8f83f755
parentfa99b36e4d60fd8af9e437476e962d27f2fe9e2b (diff)
downloadbcm5719-llvm-b4b6ec01c6d1c6f15da65c37be9ffa2482712e7f.tar.gz
bcm5719-llvm-b4b6ec01c6d1c6f15da65c37be9ffa2482712e7f.zip
[llvm-exegesis] Add missing initializer.
This is a better fix than rL345245. llvm-svn: 345246
-rw-r--r--llvm/tools/llvm-exegesis/lib/Target.cpp2
-rw-r--r--llvm/tools/llvm-exegesis/lib/Target.h16
2 files changed, 9 insertions, 9 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/Target.cpp b/llvm/tools/llvm-exegesis/lib/Target.cpp
index 588c40e8c7f..06557770418 100644
--- a/llvm/tools/llvm-exegesis/lib/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Target.cpp
@@ -87,7 +87,7 @@ ExegesisTarget::createUopsBenchmarkRunner(const LLVMState &State) const {
static_assert(std::is_pod<PfmCountersInfo>::value,
"We shouldn't have dynamic initialization here");
-const PfmCountersInfo PfmCountersInfo::Default = {nullptr, nullptr, nullptr};
+const PfmCountersInfo PfmCountersInfo::Default = {nullptr, nullptr, nullptr, 0u};
const PfmCountersInfo &
ExegesisTarget::getPfmCounters(llvm::StringRef CpuName) const {
diff --git a/llvm/tools/llvm-exegesis/lib/Target.h b/llvm/tools/llvm-exegesis/lib/Target.h
index 7f349026ece..a6ec36bebb3 100644
--- a/llvm/tools/llvm-exegesis/lib/Target.h
+++ b/llvm/tools/llvm-exegesis/lib/Target.h
@@ -34,29 +34,29 @@ namespace exegesis {
struct PfmCountersInfo {
// An optional name of a performance counter that can be used to measure
// cycles.
- const char * CycleCounter;
+ const char *const CycleCounter;
// An optional name of a performance counter that can be used to measure
// uops.
- const char * UopsCounter;
+ const char *const UopsCounter;
// An IssueCounter specifies how to measure uops issued to specific proc
// resources.
struct IssueCounter {
- const char * Counter;
+ const char *const Counter;
// The name of the ProcResource that this counter measures.
- const char * ProcResName;
+ const char *const ProcResName;
};
// An optional list of IssueCounters.
- const IssueCounter * IssueCounters;
- unsigned NumIssueCounters;
+ const IssueCounter *const IssueCounters;
+ const unsigned NumIssueCounters;
static const PfmCountersInfo Default;
};
struct CpuAndPfmCounters {
- const char * CpuName;
- const PfmCountersInfo * PCI;
+ const char *const CpuName;
+ const PfmCountersInfo *const PCI;
bool operator<(llvm::StringRef S) const {
return llvm::StringRef(CpuName) < S;
}
OpenPOWER on IntegriCloud