[llvm] r368831 - Fix "not all control paths return a value" MSVC warnings. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 04:31:06 PDT 2019


Author: rksimon
Date: Wed Aug 14 04:31:05 2019
New Revision: 368831

URL: http://llvm.org/viewvc/llvm-project?rev=368831&view=rev
Log:
Fix "not all control paths return a value" MSVC warnings. NFCI.

Modified:
    llvm/trunk/lib/Transforms/Coroutines/CoroInternal.h

Modified: llvm/trunk/lib/Transforms/Coroutines/CoroInternal.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Coroutines/CoroInternal.h?rev=368831&r1=368830&r2=368831&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Coroutines/CoroInternal.h (original)
+++ llvm/trunk/lib/Transforms/Coroutines/CoroInternal.h Wed Aug 14 04:31:05 2019
@@ -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 {




More information about the llvm-commits mailing list