diff --git a/mlir/lib/TableGen/Pattern.cpp b/mlir/lib/TableGen/Pattern.cpp --- a/mlir/lib/TableGen/Pattern.cpp +++ b/mlir/lib/TableGen/Pattern.cpp @@ -399,7 +399,7 @@ } bool SymbolInfoMap::bindAttr(StringRef symbol) { - auto inserted = symbolInfoMap.emplace(symbol, SymbolInfo::getAttr()); + auto inserted = symbolInfoMap.emplace(symbol.str(), SymbolInfo::getAttr()); return symbolInfoMap.count(inserted->first) == 1; }