Change SourgeMgr to const reference in Parser/Lexer.
SourceMgr is not be mutated during parsing/lexing.
PiperOrigin-RevId: 212145759
diff --git a/lib/Parser/Lexer.cpp b/lib/Parser/Lexer.cpp
index b4f8e1d..6b1fcd4 100644
--- a/lib/Parser/Lexer.cpp
+++ b/lib/Parser/Lexer.cpp
@@ -33,7 +33,7 @@
return c == '$' || c == '.' || c == '_' || c == '-';
}
-Lexer::Lexer(llvm::SourceMgr &sourceMgr, MLIRContext *context)
+Lexer::Lexer(const llvm::SourceMgr &sourceMgr, MLIRContext *context)
: sourceMgr(sourceMgr), context(context) {
auto bufferID = sourceMgr.getMainFileID();
curBuffer = sourceMgr.getMemoryBuffer(bufferID)->getBuffer();