[Mlir-commits] [mlir] 41e31ea - Fix GCC5 build, require explicit this->... in this call inside a lambda (NFC)

Mehdi Amini llvmlistbot at llvm.org
Thu Jan 7 09:44:52 PST 2021


Author: Mehdi Amini
Date: 2021-01-07T17:44:42Z
New Revision: 41e31eac14c239970a220f81de5fdd3b231b5184

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

LOG: Fix GCC5 build, require explicit this->... in this call inside a lambda (NFC)

Error was:

mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp:2247:36: error: cannot call member function 'mlir::LLVM::FastmathFlags mlir::LLVM::FMFAttr::getFlags() const' without object
     return bitEnumContains(getFlags(), flag);
                                    ^

Added: 
    

Modified: 
    mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
index b7f7789ee44b..cc57b1803f26 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
@@ -2244,7 +2244,7 @@ static constexpr const FastmathFlags FastmathFlagsList[] = {
 void FMFAttr::print(DialectAsmPrinter &printer) const {
   printer << "fastmath<";
   auto flags = llvm::make_filter_range(FastmathFlagsList, [&](auto flag) {
-    return bitEnumContains(getFlags(), flag);
+    return bitEnumContains(this->getFlags(), flag);
   });
   llvm::interleaveComma(flags, printer,
                         [&](auto flag) { printer << stringifyEnum(flag); });


        


More information about the Mlir-commits mailing list