mirror of https://github.com/llvm/torch-mlir
Add `report_fatal_error` to `getTypeForScalarType` (#1722)
Functions like `getTypeForScalarType` that do a mapping from one set of types to another should not fail, and if they do it should be obvious to the developer that that function has an unhandled case. Instead of silently failing when encountering an unsupported type, this commit adds a `report_fatal_error` at the end, similar to other type translation functions in this file.pull/1727/head
parent
60db793feb
commit
211cf8fc36
|
@ -96,7 +96,7 @@ Type Torch::getTypeForScalarType(
|
|||
case torch_upstream::ScalarType::Char:
|
||||
return mlir::IntegerType::get(context, 8, signedness);
|
||||
default:
|
||||
return Type();
|
||||
llvm::report_fatal_error("unhandled type for getTypeForScalarType");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue