Issue |
160537
|
Summary |
[MLIR] Build issues when enabling mlir/tblgen-to-irdl
|
Labels |
mlir
|
Assignees |
|
Reporter |
abagusetty
|
I encountered a build error when compiling the `tblgen-to-irdl` tool in MLIR. The error is due to an ambiguous reference to NoneType, which is defined in both MLIR (`mlir::NoneType`) and LLVM (`llvm::NoneType`).
Using gcc-13.3
Error:
```bash
.../llvm/mlir/tools/tblgen-to-irdl/OpDefinitionsGen.cpp: In function ‘std::optional<mlir::Type> recordToType(mlir::MLIRContext*, const llvm::Record&)’:
.../llvm/mlir/tools/tblgen-to-irdl/OpDefinitionsGen.cpp:124:12: error: reference to ‘NoneType’ is ambiguous
124 | return NoneType::get(ctx);
| ^~~~~~~~
```
Resolved with the following patch:
Qualify the symbol explicitly as `mlir::NoneType::get(ctx)` in OpDefinitionsGen.cpp to disambiguate.
```
- return NoneType::get(ctx);
+ return mlir::NoneType::get(ctx);
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs