[Mlir-commits] [mlir] Add AsmParser::parseDecimalInteger. (PR #96255)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jul 17 15:27:01 PDT 2024


================
@@ -64,6 +66,25 @@ void CompoundAAttr::print(AsmPrinter &printer) const {
 // CompoundAAttr
 //===----------------------------------------------------------------------===//
 
+
+Attribute TestDecimalIntegerAttr::parse(AsmParser &parser, Type type) {
+  if (parser.parseLess()){
+    return Attribute();
+  }
+  uint64_t intVal;
+  if (failed(*parser.parseOptionalDecimalInteger(intVal))) {
+    return Attribute();
+  }
+  if (parser.parseGreater()) {
----------------
quartersdg wrote:

I reworked it to look more like a shape like the dialect this is going to fix later

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


More information about the Mlir-commits mailing list