From cb9f9df5f8239e291a62934b0f64eb795b26d84a Mon Sep 17 00:00:00 2001 From: Alex Zinenko Date: Tue, 4 Aug 2020 14:42:17 +0200 Subject: [PATCH] [mlir] Fix GCC5 compilation problem in MLIR->LLVM type translation GCC5 seems to dislike generic lambdas calling a method of the class containing the lambda without explicit `this`. --- mlir/lib/Target/LLVMIR/TypeTranslation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/lib/Target/LLVMIR/TypeTranslation.cpp b/mlir/lib/Target/LLVMIR/TypeTranslation.cpp index 15e0f15..b327e9e 100644 --- a/mlir/lib/Target/LLVMIR/TypeTranslation.cpp +++ b/mlir/lib/Target/LLVMIR/TypeTranslation.cpp @@ -72,7 +72,7 @@ public: LLVM::LLVMFunctionType, LLVM::LLVMPointerType, LLVM::LLVMStructType, LLVM::LLVMFixedVectorType, LLVM::LLVMScalableVectorType>( - [this](auto array) { return translate(array); }) + [this](auto type) { return this->translate(type); }) .Default([](LLVM::LLVMType t) -> llvm::Type * { llvm_unreachable("unknown LLVM dialect type"); }); @@ -187,7 +187,7 @@ public: .Case( - [this](auto *type) { return translate(type); }) + [this](auto *type) { return this->translate(type); }) .Default([this](llvm::Type *type) { return translatePrimitiveType(type); }); -- 2.7.4