Skip to content

Commit 8a5066c

Browse files
committed
fix tests
1 parent 1de4485 commit 8a5066c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mlir/lib/Bytecode/Reader/BytecodeReader.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,9 +1883,11 @@ BytecodeReader::Impl::parseOpName(EncodingReader &reader,
18831883
if (failed(opName->dialect->load(dialectReader, getContext())))
18841884
return failure();
18851885

1886+
const BytecodeDialectInterface *dialectIface = opName->dialect->interface;
18861887
if (useDialectFallback) {
1887-
auto fallbackOp =
1888-
opName->dialect->interface->getFallbackOperationName();
1888+
FailureOr<OperationName> fallbackOp =
1889+
dialectIface ? dialectIface->getFallbackOperationName()
1890+
: FailureOr<OperationName>{};
18891891

18901892
// If the dialect doesn't have a fallback operation, we can't parse as
18911893
// instructed.

0 commit comments

Comments
 (0)