[mlir] fix the Disambiguate NoneType in OpDefinitionsGen (#172923)
Qualify NoneType as mlir::NoneType in recordToType to avoid ambiguity when other headers introduce a different NoneType symbol. This fixes build failures seen when enabling tblgen-to-irdl in certain downstream configurations The ambiguity is between: [llvm::Nonetype](https://github.com/intel/llvm/blob/sycl/llvm/include/llvm/ADT/None.h#L26) and [mlir::Nonetype](https://github.com/llvm/llvm-project/blob/main/mlir/tools/tblgen-to-irdl/OpDefinitionsGen.cpp#L125) Both are visible due to `using namespace mlir` and `using namespace llvm` in the file. Fixes: https://github.com/llvm/llvm-project/issues/160537
This commit is contained in:
parent
da8497ed08
commit
f6e79724ef
@ -122,7 +122,7 @@ static std::optional<Type> recordToType(MLIRContext *ctx,
|
||||
}
|
||||
|
||||
if (predRec.getName() == "NoneType") {
|
||||
return NoneType::get(ctx);
|
||||
return mlir::NoneType::get(ctx);
|
||||
}
|
||||
|
||||
if (predRec.getName() == "BF16") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user