Fix "not all control paths return a value" MSVC warnings. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 14 Aug 2019 11:31:05 +0000 (11:31 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 14 Aug 2019 11:31:05 +0000 (11:31 +0000)
llvm-svn: 368831

llvm/lib/Transforms/Coroutines/CoroInternal.h

index 98affcc..c151474 100644 (file)
@@ -165,6 +165,7 @@ struct LLVM_LIBRARY_VISIBILITY Shape {
     case coro::ABI::RetconOnce:
       return RetconLowering.ResumePrototype->getFunctionType();
     }
+    llvm_unreachable("Unknown coro::ABI enum");
   }
 
   ArrayRef<Type*> getRetconResultTypes() const {
@@ -198,6 +199,7 @@ struct LLVM_LIBRARY_VISIBILITY Shape {
     case coro::ABI::RetconOnce:
       return RetconLowering.ResumePrototype->getCallingConv();
     }
+    llvm_unreachable("Unknown coro::ABI enum");
   }
 
   unsigned getFirstSpillFieldIndex() const {
@@ -208,7 +210,8 @@ struct LLVM_LIBRARY_VISIBILITY Shape {
     case coro::ABI::Retcon:
     case coro::ABI::RetconOnce:
       return 0;
-    }    
+    }
+    llvm_unreachable("Unknown coro::ABI enum");
   }
 
   AllocaInst *getPromiseAlloca() const {