[all-commits] [llvm/llvm-project] 34d4f6: [mlir] Fix the emission of `prop-dict` when operat...

lorenzo chelini via All-commits all-commits at lists.llvm.org
Mon Oct 21 13:44:17 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 34d4f660fe57132d17d2e37b72ccfc1d07269de9
      https://github.com/llvm/llvm-project/commit/34d4f660fe57132d17d2e37b72ccfc1d07269de9
  Author: lorenzo chelini <l.chelini at icloud.com>
  Date:   2024-10-21 (Mon, 21 Oct 2024)

  Changed paths:
    M mlir/test/IR/properties.mlir
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/OpFormatGen.cpp
    M mlir/tools/mlir-tblgen/OpFormatGen.h

  Log Message:
  -----------
  [mlir] Fix the emission of `prop-dict` when operations have no properties (#112851)

When an operation has no properties, no property struct is emitted. To avoid a compilation error, we should also skip emitting `setPropertiesFromParsedAttr`, `parseProperties` and `printProperties` in such cases.
    
Compilation error:
    
```
    error: ‘Properties’ has not been declared
      static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
    
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list