[Mlir-commits] [mlir] [mlir][async] Avoid crash when not using `func.func` (PR #72801)

Mehdi Amini llvmlistbot at llvm.org
Mon Nov 20 11:57:31 PST 2023


================
@@ -1143,6 +1143,8 @@ void OpEmitter::genAttrNameGetters() {
       const char *const getAttrName = R"(
   assert(index < {0} && "invalid attribute index");
   assert(name.getStringRef() == getOperationName() && "invalid operation name");
+  assert(!name.getAttributeNames().empty() && "empty attribute names. Is a new "
----------------
joker-eph wrote:

I suspect a better assert here may be `assert(name.isRegistered() && "Operation isn't registered, missing a dependent dialect loading?");`

https://github.com/llvm/llvm-project/pull/72801


More information about the Mlir-commits mailing list