From: Alex Zinenko Date: Tue, 4 Aug 2020 12:42:17 +0000 (+0200) Subject: [mlir] Fix GCC5 compilation problem in MLIR->LLVM type translation X-Git-Tag: llvmorg-13-init~15876 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb9f9df5f8239e291a62934b0f64eb795b26d84a;p=platform%2Fupstream%2Fllvm.git [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`. --- 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); });