Skip to content

Commit 217d0a8

Browse files
authored
Fix no return in NDEBUG builds (#4011)
Uses `llvm_unreachable` to mark path unreachable to fix compiler error ``` DefaultDomainQtoZ.cpp:194:1: error: non-void function does not return a value in all control paths ``` Signed-off-by: Ian Wood <[email protected]>
1 parent 460c9f3 commit 217d0a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Type getTorchScalarType(
190190
if (isa<FloatType>(elementTypeForGivenTensor))
191191
return rewriter.getType<Torch::FloatType>();
192192

193-
assert(false && "dtype for given tensor expected to be either int or float");
193+
llvm_unreachable("dtype for given tensor expected to be either int or float");
194194
}
195195

196196
Value extractTorchScalar(

0 commit comments

Comments
 (0)