[Mlir-commits] [mlir] e7aed22 - [mlir] Fix -Wunused-private-field. NFC

Fangrui Song llvmlistbot at llvm.org
Wed Aug 23 10:51:17 PDT 2023


Author: Fangrui Song
Date: 2023-08-23T10:51:13-07:00
New Revision: e7aed2265e1ed66c3047782cf4a4c1ea2188ca51

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

LOG: [mlir] Fix -Wunused-private-field. NFC

Added: 
    

Modified: 
    mlir/lib/IR/AsmPrinter.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp
index 8bae108d13cf26..a39ad77a04205b 100644
--- a/mlir/lib/IR/AsmPrinter.cpp
+++ b/mlir/lib/IR/AsmPrinter.cpp
@@ -3093,8 +3093,7 @@ class OperationPrinter : public AsmPrinter::Impl, private OpAsmPrinter {
     using ValueFn = function_ref<void(raw_ostream &)>;
     using PrintFn = function_ref<void(StringRef, ValueFn)>;
 
-    ResourceBuilder(OperationPrinter &p, PrintFn printFn)
-        : p(p), printFn(printFn) {}
+    ResourceBuilder(PrintFn printFn) : printFn(printFn) {}
     ~ResourceBuilder() override = default;
 
     void buildBool(StringRef key, bool data) final {
@@ -3118,7 +3117,6 @@ class OperationPrinter : public AsmPrinter::Impl, private OpAsmPrinter {
     }
 
   private:
-    OperationPrinter &p;
     PrintFn printFn;
   };
 
@@ -3225,7 +3223,7 @@ void OperationPrinter::printResourceFileMetadata(
         valueFn(os);
       }
     };
-    ResourceBuilder entryBuilder(*this, printFn);
+    ResourceBuilder entryBuilder(printFn);
     provider.buildResources(op, providerArgs..., entryBuilder);
 
     needEntryComma |= hadEntry;


        


More information about the Mlir-commits mailing list