From: Lei Zhang Date: Fri, 27 Mar 2020 22:52:15 +0000 (-0400) Subject: [mlir][spirv] Add return to function to please MSVC X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0af43816193aac382276c878deb4e33ed76be1d;p=platform%2Fupstream%2Fllvm.git [mlir][spirv] Add return to function to please MSVC This suppresses the "not all control paths return a value" warning. --- diff --git a/mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp b/mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp index 3fd987b..776e242 100644 --- a/mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp +++ b/mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp @@ -18,6 +18,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Debug.h" +#include #include #define DEBUG_TYPE "mlir-spirv-lowering" @@ -136,6 +137,8 @@ SPIRVTypeConverter::getMemorySpaceForStorageClass(spirv::StorageClass storage) { switch (storage) { STORAGE_SPACE_MAP_LIST(STORAGE_SPACE_MAP_FN) } #undef STORAGE_SPACE_MAP_FN + llvm_unreachable("unhandled storage class!"); + return UINT32_MAX; } Optional