[Mlir-commits] [mlir] e36a393 - [mlir][SPIRV] Fix build error (#111264)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Oct 5 12:46:35 PDT 2024


Author: Matthias Springer
Date: 2024-10-05T21:46:31+02:00
New Revision: e36a39346796528f75ff01ef1084b2dfe0a2a747

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

LOG: [mlir][SPIRV] Fix build error (#111264)

Fix build error that was introduced by #111250. Also, the deleted
function is not needed at all.

```
../llvm-project/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h: In member function ‘const mlir::LLVMTypeConverter* mlir::SPIRVToLLVMConversion<SPIRVOp>::getTypeConverter() const’:
../llvm-project/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h:35:12: error: invalid ‘static_cast’ from type ‘const mlir::TypeConverter*’ to type ‘const mlir::LLVMTypeConverter*’
   35 |     return static_cast<const LLVMTypeConverter *>(
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   36 |         ConversionPattern::getTypeConverter());
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../llvm-project/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h:21:7: note: class type ‘const mlir::LLVMTypeConverter’ is incomplete
```

Added: 
    

Modified: 
    mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h b/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h
index e59373c955fc3b..e78b954d5e0d52 100644
--- a/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h
+++ b/mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h
@@ -29,12 +29,6 @@ class SPIRVToLLVMConversion : public OpConversionPattern<SPIRVOp> {
                         const LLVMTypeConverter &typeConverter,
                         PatternBenefit benefit = 1)
       : OpConversionPattern<SPIRVOp>(typeConverter, context, benefit) {}
-
-protected:
-  const LLVMTypeConverter *getTypeConverter() const {
-    return static_cast<const LLVMTypeConverter *>(
-        ConversionPattern::getTypeConverter());
-  }
 };
 
 /// Encodes global variable's descriptor set and binding into its name if they


        


More information about the Mlir-commits mailing list