]> granicus.if.org Git - llvm/commitdiff
Fix covered-switch-default warning
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 18 Sep 2016 21:08:35 +0000 (21:08 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 18 Sep 2016 21:08:35 +0000 (21:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281865 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/PGOInstrumentation.cpp

index 8f556683c3553b2c33fac700b0f41ee49ba34bfd..bff155c1d67e273955227030a1b3d5b59ded9b2e 100644 (file)
@@ -983,14 +983,13 @@ void SelectInstVisitor::visitSelectInst(SelectInst &SI) {
     return;
   case VM_instrument:
     instrumentOneSelectInst(SI);
-    break;
+    return;
   case VM_annotate:
     annotateOneSelectInst(SI);
-    break;
-  default:
-    llvm_unreachable("Unknown visiting mode");
-    break;
+    return;
   }
+
+  llvm_unreachable("Unknown visiting mode");
 }
 
 // Traverse all the indirect callsites and annotate the instructions.