llvm-project
c9ca768c - [mlir][shape] Fix crash when shape.lib array references undefined symbol (#184613)

Commit
55 days ago
[mlir][shape] Fix crash when shape.lib array references undefined symbol (#184613) In verifyOperationAttribute(), the single-symbol path for shape.lib used SymbolTable::lookupSymbolIn() followed by an explicit null check. The array path at line 196-197 used dyn_cast<FunctionLibraryOp>() directly on the lookup result, which asserts when the symbol is not found (null pointer). Fix: use dyn_cast_or_null<> instead of dyn_cast<> so that a missing symbol falls through to the existing "does not refer to FunctionLibraryOp" error diagnostic instead of asserting. Fixes #159653
Author
Parents
Loading