[Mlir-commits] [mlir] 83af56e - [mlir][tblgen] Fully qualify more names.
Christian Sigg
llvmlistbot at llvm.org
Wed Aug 23 23:53:42 PDT 2023
Author: Christian Sigg
Date: 2023-08-24T08:53:35+02:00
New Revision: 83af56e20e02adbe3148a3fbba6f235412eb34dc
URL: https://github.com/llvm/llvm-project/commit/83af56e20e02adbe3148a3fbba6f235412eb34dc
DIFF: https://github.com/llvm/llvm-project/commit/83af56e20e02adbe3148a3fbba6f235412eb34dc.diff
LOG: [mlir][tblgen] Fully qualify more names.
Fixes compilation issues when the generated code does not live in the `mlir` namespace.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D158608
Added:
Modified:
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
mlir/tools/mlir-tblgen/OpFormatGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index 836f73e49b49f3..93fd106610dd13 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -164,7 +164,7 @@ if ($_reader.getBytecodeVersion() < /*kNativePropertiesODSSegmentSize=*/6) {
$_reader.emitError("size mismatch for operand/result_segment_size");
return ::mlir::failure();
}
- llvm::copy(::llvm::ArrayRef<int32_t>(attr), $_storage.begin());
+ ::llvm::copy(::llvm::ArrayRef<int32_t>(attr), $_storage.begin());
} else {
return $_reader.readSparseArray(::llvm::MutableArrayRef($_storage));
}
diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.cpp b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
index 546d4616f71735..74c4c7eece74e7 100644
--- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
@@ -1706,7 +1706,7 @@ void OperationFormat::genParserVariadicSegmentResolution(Operator &op,
body << "1";
};
if (op.getDialect().usePropertiesForAttributes()) {
- body << "llvm::copy(ArrayRef<int32_t>({";
+ body << "::llvm::copy(::llvm::ArrayRef<int32_t>({";
llvm::interleaveComma(op.getResults(), body, interleaveFn);
body << formatv("}), "
"result.getOrAddProperties<{0}::Properties>()."
More information about the Mlir-commits
mailing list