[Mlir-commits] [mlir] 0f95e73 - [mlir] fix build after llvm made ElementCount constructor private

Alex Zinenko llvmlistbot at llvm.org
Wed Aug 19 09:48:59 PDT 2020


Author: Alex Zinenko
Date: 2020-08-19T18:48:24+02:00
New Revision: 0f95e73190c9a555c2917a2963eab128c4ba5395

URL: https://github.com/llvm/llvm-project/commit/0f95e73190c9a555c2917a2963eab128c4ba5395
DIFF: https://github.com/llvm/llvm-project/commit/0f95e73190c9a555c2917a2963eab128c4ba5395.diff

LOG: [mlir] fix build after llvm made ElementCount constructor private

The original patch (264afb9e6aebc98c353644dd0700bec808501cab) did not
update subprojects.

Added: 
    

Modified: 
    mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
    mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
index 727efbb4704f..18008c614bd5 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
@@ -483,7 +483,7 @@ LLVMType LLVMVectorType::getElementType() {
 
 llvm::ElementCount LLVMVectorType::getElementCount() {
   // Both derived classes share the implementation type.
-  return llvm::ElementCount(
+  return llvm::ElementCount::get(
       static_cast<detail::LLVMTypeAndSizeStorage *>(impl)->numElements,
       isa<LLVMScalableVectorType>());
 }

diff  --git a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
index 21f5201c7d69..093a9e62c3c8 100644
--- a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
@@ -141,7 +141,7 @@ llvm::Constant *ModuleTranslation::getLLVMConstant(llvm::Type *llvmType,
       return nullptr;
     if (llvmType->isVectorTy())
       return llvm::ConstantVector::getSplat(
-          llvm::ElementCount(numElements, /*Scalable=*/false), child);
+          llvm::ElementCount::get(numElements, /*Scalable=*/false), child);
     if (llvmType->isArrayTy()) {
       auto *arrayType = llvm::ArrayType::get(elementType, numElements);
       SmallVector<llvm::Constant *, 8> constants(numElements, child);


        


More information about the Mlir-commits mailing list