================
@@ -103,6 +103,16 @@ LogicalResult 
ROCDLDialect::verifyOperationAttribute(Operation *op,
                              << "' attribute attached to unexpected op";
     }
   }
+  // xnack/sramecc describe the whole code object.
+  if (attr.getName() == xnackAttrName.getName() ||
+      attr.getName() == srameccAttrName.getName()) {
+    if (!LLVM::satisfiesLLVMModule(op))
+      return op->emitError() << "'" << attr.getName().getValue()
+                             << "' is only supported on modules";
+    if (!isa<BoolAttr>(attr.getValue()))
+      return op->emitError()
+             << "'" << attr.getName().getValue() << "' must be a boolean";
----------------
krzysz00 wrote:

The name is a `StringAttr` (read, string interned into the context) and getting 
the `StringRef` out of it wants a `getValue()`. I'll double-check tomorrow if 
`StringAttr` itself can be printed

https://github.com/llvm/llvm-project/pull/222444
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to