From d813116c9deaa960ddcce5b4b161ea589d6e9a34 Mon Sep 17 00:00:00 2001 From: Dawid Jurczak Date: Tue, 1 Mar 2022 17:24:13 +0100 Subject: [NFC][Lexer] Remove getLangOpts function from Lexer Given that there is only one external user of Lexer::getLangOpts we can remove getter entirely without much pain. Differential Revision: https://reviews.llvm.org/D120404 --- clang/lib/Lex/ModuleMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Lex/ModuleMap.cpp') diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 824b2bb..a5eca40 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -1625,7 +1625,7 @@ retry: SpellingBuffer.resize(LToken.getLength() + 1); const char *Start = SpellingBuffer.data(); unsigned Length = - Lexer::getSpelling(LToken, Start, SourceMgr, L.getLangOpts()); + Lexer::getSpelling(LToken, Start, SourceMgr, Map.LangOpts); uint64_t Value; if (StringRef(Start, Length).getAsInteger(0, Value)) { Diags.Report(Tok.getLocation(), diag::err_mmap_unknown_token); -- cgit v1.1