Skip to content

Commit eedf3c4

Browse files
PappasBrentxlauko
authored andcommitted
hl: Check that callee is not empty.
- Check that the argument callee in getFunctionType() is not empty so that calling callee.dyn_cast() does not raise an error.
1 parent 2a826b7 commit eedf3c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/vast/Dialect/HighLevel/HighLevelTypes.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ namespace vast::hl
9292
}
9393

9494
core::FunctionType getFunctionType(mlir::CallInterfaceCallable callee, vast_module mod) {
95+
if (!callee) {
96+
return {};
97+
}
98+
9599
if (auto sym = callee.dyn_cast< mlir::SymbolRefAttr >()) {
96100
return mlir::dyn_cast_or_null< FuncOp >(
97101
mlir::SymbolTable::lookupSymbolIn(mod, sym)

0 commit comments

Comments
 (0)