[PATCH] D115434: [benchmark] Reapply fix for -Wcovered-switch-default warning

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 9 11:40:27 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0b20c96fd65d: [benchmark] Reapply fix for -Wcovered-switch-default warning (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115434/new/

https://reviews.llvm.org/D115434

Files:
  third-party/benchmark/src/sysinfo.cc


Index: third-party/benchmark/src/sysinfo.cc
===================================================================
--- third-party/benchmark/src/sysinfo.cc
+++ third-party/benchmark/src/sysinfo.cc
@@ -344,6 +344,7 @@
     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 @@
       case CacheTrace:
         C.type = "Trace";
         break;
-      default:
-        C.type = "Unknown";
-        break;
     }
     res.push_back(C);
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115434.393234.patch
Type: text/x-patch
Size: 611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211209/4e5084f7/attachment.bin>


More information about the llvm-commits mailing list