-
Couldn't load subscription status.
- Fork 15k
Open
Labels
Description
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:
.../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);