diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp index a429963277d1..937dbc00521e 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp @@ -231,7 +231,7 @@ TokenVerifier::TokenVerifier(std::string body) { Opts.CPlusPlus17 = true; Opts.LineComment = true; - Lexer lex(FID, buf.get(), SM, Opts); + Lexer lex(FID, buf->getMemBufferRef(), SM, Opts); Token token; bool exit = false; diff --git a/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp b/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp index aaf578c6f728..f3194beff1ec 100644 --- a/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp +++ b/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp @@ -178,7 +178,7 @@ void ClangHighlighter::Highlight(const HighlightStyle &options, Opts.CPlusPlus17 = true; Opts.LineComment = true; - Lexer lex(FID, buf.get(), SM, Opts); + Lexer lex(FID, buf->getMemBufferRef(), SM, Opts); // The lexer should keep whitespace around. lex.SetKeepWhitespaceMode(true);