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
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)));
}