[Mlir-commits] [mlir] f530e6e - [mlir] Drop `const` from `SymbolTableCollection::lookupSymbolIn`

Jeff Niu llvmlistbot at llvm.org
Sat Nov 5 16:28:37 PDT 2022


Author: Jeff Niu
Date: 2022-11-05T16:28:30-07:00
New Revision: f530e6e34ee19cfc6f08179879dab64207d51237

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

LOG: [mlir] Drop `const` from `SymbolTableCollection::lookupSymbolIn`

This function didn't work because it was marked const but both functions
it could dispatch to are not.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D137380

Added: 
    

Modified: 
    mlir/include/mlir/IR/SymbolTable.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/SymbolTable.h b/mlir/include/mlir/IR/SymbolTable.h
index 3cc48000e1944..a24693575f033 100644
--- a/mlir/include/mlir/IR/SymbolTable.h
+++ b/mlir/include/mlir/IR/SymbolTable.h
@@ -249,7 +249,7 @@ class SymbolTableCollection {
   Operation *lookupSymbolIn(Operation *symbolTableOp, StringAttr symbol);
   Operation *lookupSymbolIn(Operation *symbolTableOp, SymbolRefAttr name);
   template <typename T, typename NameT>
-  T lookupSymbolIn(Operation *symbolTableOp, NameT &&name) const {
+  T lookupSymbolIn(Operation *symbolTableOp, NameT &&name) {
     return dyn_cast_or_null<T>(
         lookupSymbolIn(symbolTableOp, std::forward<NameT>(name)));
   }


        


More information about the Mlir-commits mailing list