Skip to content
Commit bc5c7378 authored by River Riddle's avatar River Riddle Committed by Mehdi Amini
Browse files

Add a utility method to MLIRContext get a registered dialect with the...

    Add a utility method to MLIRContext get a registered dialect with the derived type instead of the string name. The derived dialect type must provide a static 'getDialectNamespace' method.

    This means that we can now do something like:
      ctx->getRegisteredDialect<LLVMDialect>();

    as opposed to:
      static_cast<LLVMDialect *>(ctx->getRegisteredDialect("llvm");

--

PiperOrigin-RevId: 247989896
parent d39a3062
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment