summaryrefslogtreecommitdiff
path: root/third-party
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2021-12-09 11:09:39 +0200
committerMartin Storsjö <martin@martin.st>2021-12-09 21:39:29 +0200
commit0b20c96fd65d44ddb3be70b2ac1f51058a105bc5 (patch)
tree725f2738e34a207916d1d1efe3541f12fcb1b924 /third-party
parent529a79302bf35f9a5822cc00395bba99f3575e30 (diff)
downloadllvm-0b20c96fd65d44ddb3be70b2ac1f51058a105bc5.tar.gz
[benchmark] Reapply fix for -Wcovered-switch-default warning
This reapplies a fix from 948ce4e6edec6ad3cdf1911fc3e8e9569140d4ff, whichn't originally submitted upstream. I has now been merged upstream though, in https://github.com/google/benchmark/pull/1302. When benchmarks were unified in 5dda2efde574d3a200d04c371f561a77ee9f4aff, it lost this change, but it also lost another local modification, where benchmark's CMakeLists.txt was modified to comment out adding -Werror. (This change was part of the original import in 0addd170ab0880941fa4089c2717f3f3a0e4e25a.) As the benchmark library is built automatically by default, when building all of LLVM (contrary to the copy in libcxx, which wasn't built by default), building it with -Werror by default is very brittle. This fixes building LLVM with MinGW. (It wasn't broken in MSVC mode, as the benchmark library doesn't add -Werror or anything equivalent in MSVC mode, and it's unclear if this warning is enabled in that mode at all.) Differential Revision: https://reviews.llvm.org/D115434
Diffstat (limited to 'third-party')
-rw-r--r--third-party/benchmark/src/sysinfo.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/third-party/benchmark/src/sysinfo.cc b/third-party/benchmark/src/sysinfo.cc
index c1969ea2d3fe..112e9b4a0e2b 100644
--- a/third-party/benchmark/src/sysinfo.cc
+++ b/third-party/benchmark/src/sysinfo.cc
@@ -344,6 +344,7 @@ std::vector<CPUInfo::CacheInfo> GetCacheSizesWindows() {
C.num_sharing = static_cast<int>(B.count());
C.level = Cache->Level;
C.size = Cache->Size;
+ C.type = "Unknown";
switch (Cache->Type) {
case CacheUnified:
C.type = "Unified";
@@ -357,9 +358,6 @@ std::vector<CPUInfo::CacheInfo> GetCacheSizesWindows() {
case CacheTrace:
C.type = "Trace";
break;
- default:
- C.type = "Unknown";
- break;
}
res.push_back(C);
}