From cff2fcd7ceade40afacdfea95bd33dd0240dd925 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 14 Aug 2019 11:31:05 +0000 Subject: [PATCH] Fix "not all control paths return a value" MSVC warnings. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368831 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Coroutines/CoroInternal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/Coroutines/CoroInternal.h b/lib/Transforms/Coroutines/CoroInternal.h index 98affcc5f44..c151474316f 100644 --- a/lib/Transforms/Coroutines/CoroInternal.h +++ b/lib/Transforms/Coroutines/CoroInternal.h @@ -165,6 +165,7 @@ struct LLVM_LIBRARY_VISIBILITY Shape { case coro::ABI::RetconOnce: return RetconLowering.ResumePrototype->getFunctionType(); } + llvm_unreachable("Unknown coro::ABI enum"); } ArrayRef 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 {