[mlir] CRunnerUtils: qualify UnrankedMemRefType to avoid collisions with mlir::UnrankedMemRefType

When CRunnerUtils included together with MLIR IR headers, it can lead to compilation errors.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D124744
This commit is contained in:
Eugene Zhulenev 2022-05-01 13:28:51 -07:00
parent fed7be096f
commit 38d0df5577

View File

@ -312,7 +312,7 @@ public:
explicit DynamicMemRefType(const StridedMemRefType<T, N> &memRef)
: rank(N), basePtr(memRef.basePtr), data(memRef.data),
offset(memRef.offset), sizes(memRef.sizes), strides(memRef.strides) {}
explicit DynamicMemRefType(const UnrankedMemRefType<T> &memRef)
explicit DynamicMemRefType(const ::UnrankedMemRefType<T> &memRef)
: rank(memRef.rank) {
auto *desc = static_cast<StridedMemRefType<T, 1> *>(memRef.descriptor);
basePtr = desc->basePtr;
@ -334,8 +334,8 @@ public:
// Small runtime support library for memref.copy lowering during codegen.
//===----------------------------------------------------------------------===//
extern "C" MLIR_CRUNNERUTILS_EXPORT void
memrefCopy(int64_t elemSize, UnrankedMemRefType<char> *src,
UnrankedMemRefType<char> *dst);
memrefCopy(int64_t elemSize, ::UnrankedMemRefType<char> *src,
::UnrankedMemRefType<char> *dst);
//===----------------------------------------------------------------------===//
// Small runtime support library for vector.print lowering during codegen.