[Mlir-commits] [mlir] ad0b2d9 - Add llvm_unreachable to avoid MSVC warning

Geoffrey Martin-Noble llvmlistbot at llvm.org
Mon Oct 19 20:29:47 PDT 2020


Author: Geoffrey Martin-Noble
Date: 2020-10-19T20:29:33-07:00
New Revision: ad0b2d9d46a368248ed27bd27d3500cc8028456e

URL: https://github.com/llvm/llvm-project/commit/ad0b2d9d46a368248ed27bd27d3500cc8028456e
DIFF: https://github.com/llvm/llvm-project/commit/ad0b2d9d46a368248ed27bd27d3500cc8028456e.diff

LOG: Add llvm_unreachable to avoid MSVC warning

Without this I get a warning about not all paths returning.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D89760

Added: 
    

Modified: 
    mlir/lib/Dialect/StandardOps/IR/Ops.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
index d682ebcd1d8d..9fe94fe75327 100644
--- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
+++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
@@ -3003,6 +3003,7 @@ static LogicalResult produceSubViewErrorMsg(SubViewVerificationResult result,
            << expectedType
            << " or a rank-reduced version. (mismatch of result affine map)";
   }
+  llvm_unreachable("unexpected subview verification result");
 }
 
 template <typename OpType>


        


More information about the Mlir-commits mailing list