@@ -35,7 +35,7 @@ namespace mlir {
3535using OperationDefinition = AsmParserState::OperationDefinition;
3636
3737// / Return the source code associated with the OperationDefinition.
38- SMRange getOpRange (const OperationDefinition &op) {
38+ static SMRange getOpRange (const OperationDefinition &op) {
3939 const char *startOp = op.scopeLoc .Start .getPointer ();
4040 const char *endOp = op.scopeLoc .End .getPointer ();
4141
@@ -187,15 +187,15 @@ std::unique_ptr<RewritePad> RewritePad::init(StringRef inputFilename,
187187}
188188
189189// / 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 ; }
191191
192192// / Return whether the operation was printed using generic syntax in original
193193// / buffer.
194- bool isGeneric (const OperationDefinition &op) {
194+ static bool isGeneric (const OperationDefinition &op) {
195195 return op.loc .Start .getPointer ()[0 ] == ' "' ;
196196}
197197
198- inline int asMainReturnCode (LogicalResult r) {
198+ static inline int asMainReturnCode (LogicalResult r) {
199199 return r.succeeded () ? EXIT_SUCCESS : EXIT_FAILURE;
200200}
201201
@@ -293,7 +293,7 @@ static llvm::cl::opt<std::string> simpleRenameReplace{
293293 llvm::cl::cat (clSimpleRenameCategory)};
294294
295295// Rewriter that does simple renames.
296- LogicalResult simpleRename (RewritePad &rewriteState, raw_ostream &os) {
296+ static LogicalResult simpleRename (RewritePad &rewriteState, raw_ostream &os) {
297297 StringRef opName = simpleRenameOpName;
298298 StringRef match = simpleRenameMatch;
299299 StringRef replace = simpleRenameReplace;
@@ -317,7 +317,7 @@ static mlir::RewriterRegistration rewriteSimpleRename("simple-rename",
317317 simpleRename);
318318
319319// Rewriter that insert range markers.
320- LogicalResult markRanges (RewritePad &rewriteState, raw_ostream &os) {
320+ static LogicalResult markRanges (RewritePad &rewriteState, raw_ostream &os) {
321321 for (const auto &it : rewriteState.getOpDefs ()) {
322322 auto [startOp, endOp] = getOpRange (it);
323323
0 commit comments