Skip to content

Commit 78a8188

Browse files
committed
Review feedback: use llvm::is_contained
1 parent 5bc34e7 commit 78a8188

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mlir/lib/Transforms/ViewOpGraph.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "mlir/IR/Operation.h"
1515
#include "mlir/Pass/Pass.h"
1616
#include "mlir/Support/IndentedOstream.h"
17+
#include "llvm/ADT/STLExtras.h"
1718
#include "llvm/Support/Format.h"
1819
#include "llvm/Support/GraphWriter.h"
1920
#include <map>
@@ -60,11 +61,9 @@ static std::string quoteString(const std::string &str) {
6061
std::string escapeLabelString(const std::string &str) {
6162
std::string buf;
6263
llvm::raw_string_ostream os(buf);
63-
llvm::DenseSet<char> shouldEscape = {'{', '|', '<', '}', '>', '\n', '"'};
6464
for (char c : str) {
65-
if (shouldEscape.contains(c)) {
65+
if (llvm::is_contained({'{', '|', '<', '}', '>', '\n', '"'}, c))
6666
os << '\\';
67-
}
6867
os << c;
6968
}
7069
return buf;

0 commit comments

Comments
 (0)