[Mlir-commits] [mlir] 38d0df5 - [mlir] CRunnerUtils: qualify UnrankedMemRefType to avoid collisions with mlir::UnrankedMemRefType

Eugene Zhulenev llvmlistbot at llvm.org
Mon May 2 10:19:09 PDT 2022


Author: Eugene Zhulenev
Date: 2022-05-02T10:19:02-07:00
New Revision: 38d0df557706940af5d7110bdf662590449f8a60

URL: https://github.com/llvm/llvm-project/commit/38d0df557706940af5d7110bdf662590449f8a60
DIFF: https://github.com/llvm/llvm-project/commit/38d0df557706940af5d7110bdf662590449f8a60.diff

LOG: [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

Added: 
    

Modified: 
    mlir/include/mlir/ExecutionEngine/CRunnerUtils.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h b/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
index 44eab5057786e..e536ae8fe1154 100644
--- a/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
+++ b/mlir/include/mlir/ExecutionEngine/CRunnerUtils.h
@@ -312,7 +312,7 @@ class DynamicMemRefType {
   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 @@ class DynamicMemRefType {
 // 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.


        


More information about the Mlir-commits mailing list