[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / utils / TableGen / Common / GlobalISel / CombinerUtils.cpp
blob37e6306050951b6db1189a3eda43f809ff95f244
1 //===- CombinerUtils.cpp --------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "CombinerUtils.h"
10 #include "llvm/ADT/StringSet.h"
12 namespace llvm {
14 StringRef insertStrRef(StringRef S) {
15 if (S.empty())
16 return {};
18 static StringSet<> Pool;
19 auto [It, Inserted] = Pool.insert(S);
20 return It->getKey();
23 } // namespace llvm