[Lldb-commits] [lldb] f96e16b - lldb: Update for change in `clang::Lexer`'s constructor

Duncan P. N. Exon Smith via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 19 17:09:35 PDT 2020


Author: Duncan P. N. Exon Smith
Date: 2020-10-19T20:09:27-04:00
New Revision: f96e16bc15a9a10857681b85b6c8824b9addd9b2

URL: https://github.com/llvm/llvm-project/commit/f96e16bc15a9a10857681b85b6c8824b9addd9b2
DIFF: https://github.com/llvm/llvm-project/commit/f96e16bc15a9a10857681b85b6c8824b9addd9b2.diff

LOG: lldb: Update for change in `clang::Lexer`'s constructor

b3eff6b7bb31e7ef059a3d238de138849839fbbd updated `Lexer::Lexer` to take
`clang::MemoryBufferRef` instead of `clang::MemoryBuffer*`. Update LLDB
to fix the bots.

Added: 
    

Modified: 
    lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
    lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp

Removed: 
    


################################################################################
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);
 


        


More information about the lldb-commits mailing list