@@ -35,7 +35,7 @@ namespace mlir {
35
35
using OperationDefinition = AsmParserState::OperationDefinition;
36
36
37
37
// / Return the source code associated with the OperationDefinition.
38
- SMRange getOpRange (const OperationDefinition &op) {
38
+ static SMRange getOpRange (const OperationDefinition &op) {
39
39
const char *startOp = op.scopeLoc .Start .getPointer ();
40
40
const char *endOp = op.scopeLoc .End .getPointer ();
41
41
@@ -187,15 +187,15 @@ std::unique_ptr<RewritePad> RewritePad::init(StringRef inputFilename,
187
187
}
188
188
189
189
// / Return the source code associated with the operation name.
190
- SMRange getOpNameRange (const OperationDefinition &op) { return op.loc ; }
190
+ static SMRange getOpNameRange (const OperationDefinition &op) { return op.loc ; }
191
191
192
192
// / Return whether the operation was printed using generic syntax in original
193
193
// / buffer.
194
- bool isGeneric (const OperationDefinition &op) {
194
+ static bool isGeneric (const OperationDefinition &op) {
195
195
return op.loc .Start .getPointer ()[0 ] == ' "' ;
196
196
}
197
197
198
- inline int asMainReturnCode (LogicalResult r) {
198
+ static inline int asMainReturnCode (LogicalResult r) {
199
199
return r.succeeded () ? EXIT_SUCCESS : EXIT_FAILURE;
200
200
}
201
201
@@ -293,7 +293,7 @@ static llvm::cl::opt<std::string> simpleRenameReplace{
293
293
llvm::cl::cat (clSimpleRenameCategory)};
294
294
295
295
// Rewriter that does simple renames.
296
- LogicalResult simpleRename (RewritePad &rewriteState, raw_ostream &os) {
296
+ static LogicalResult simpleRename (RewritePad &rewriteState, raw_ostream &os) {
297
297
StringRef opName = simpleRenameOpName;
298
298
StringRef match = simpleRenameMatch;
299
299
StringRef replace = simpleRenameReplace;
@@ -317,7 +317,7 @@ static mlir::RewriterRegistration rewriteSimpleRename("simple-rename",
317
317
simpleRename);
318
318
319
319
// Rewriter that insert range markers.
320
- LogicalResult markRanges (RewritePad &rewriteState, raw_ostream &os) {
320
+ static LogicalResult markRanges (RewritePad &rewriteState, raw_ostream &os) {
321
321
for (const auto &it : rewriteState.getOpDefs ()) {
322
322
auto [startOp, endOp] = getOpRange (it);
323
323
0 commit comments