[llvm] r348486 - Fix -Wcovered-switch-default warning. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 6 06:02:03 PST 2018


Author: rksimon
Date: Thu Dec  6 06:02:02 2018
New Revision: 348486

URL: http://llvm.org/viewvc/llvm-project?rev=348486&view=rev
Log:
Fix -Wcovered-switch-default warning. NFCI.

Modified:
    llvm/trunk/utils/benchmark/src/sysinfo.cc

Modified: llvm/trunk/utils/benchmark/src/sysinfo.cc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/benchmark/src/sysinfo.cc?rev=348486&r1=348485&r2=348486&view=diff
==============================================================================
--- llvm/trunk/utils/benchmark/src/sysinfo.cc (original)
+++ llvm/trunk/utils/benchmark/src/sysinfo.cc Thu Dec  6 06:02:02 2018
@@ -333,6 +333,7 @@ std::vector<CPUInfo::CacheInfo> GetCache
     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";
@@ -346,9 +347,6 @@ std::vector<CPUInfo::CacheInfo> GetCache
       case CacheTrace:
         C.type = "Trace";
         break;
-      default:
-        C.type = "Unknown";
-        break;
     }
     res.push_back(C);
   }




More information about the llvm-commits mailing list