[Mlir-commits] [mlir] d0af438 - [mlir][spirv] Add return to function to please MSVC
Lei Zhang
llvmlistbot at llvm.org
Fri Mar 27 15:58:20 PDT 2020
Author: Lei Zhang
Date: 2020-03-27T18:52:15-04:00
New Revision: d0af43816193aac382276c878deb4e33ed76be1d
URL: https://github.com/llvm/llvm-project/commit/d0af43816193aac382276c878deb4e33ed76be1d
DIFF: https://github.com/llvm/llvm-project/commit/d0af43816193aac382276c878deb4e33ed76be1d.diff
LOG: [mlir][spirv] Add return to function to please MSVC
This suppresses the "not all control paths return a value" warning.
Added:
Modified:
mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp b/mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
index 3fd987b0e565..776e2420de7e 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 <cstdint>
#include <functional>
#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<spirv::StorageClass>
More information about the Mlir-commits
mailing list