From b333d6e129f23d204cd3a44ffb9f3a69dc3e0bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Duncan=20P=2E=20N=2E=20Exon=C2=A0Smith?= Date: Tue, 20 Oct 2020 13:50:52 -0400 Subject: [PATCH] lldb: Migrate to MemoryBufferRef for createFileID (after 51d1d585e5838ea0f02f1271f7543c4e43639969) I missed these two lldb users before deleting the `UnownedTag` API for `createFileID` in 51d1d585e5838ea0f02f1271f7543c4e43639969. This should fix the build. --- .../ExpressionParser/Clang/ClangExpressionSourceCode.cpp | 2 +- lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp index 937dbc00521e..91fd246eb456 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp @@ -221,7 +221,7 @@ TokenVerifier::TokenVerifier(std::string body) { clang::SourceManager SM(diags, file_mgr); auto buf = llvm::MemoryBuffer::getMemBuffer(body); - FileID FID = SM.createFileID(clang::SourceManager::Unowned, buf.get()); + FileID FID = SM.createFileID(buf->getMemBufferRef()); // Let's just enable the latest ObjC and C++ which should get most tokens // right. diff --git a/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp b/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp index f3194beff1ec..fe6eeea54e4d 100644 --- a/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp +++ b/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp @@ -168,7 +168,7 @@ void ClangHighlighter::Highlight(const HighlightStyle &options, clang::SourceManager SM(diags, file_mgr); auto buf = llvm::MemoryBuffer::getMemBuffer(full_source); - FileID FID = SM.createFileID(clang::SourceManager::Unowned, buf.get()); + FileID FID = SM.createFileID(buf->getMemBufferRef()); // Let's just enable the latest ObjC and C++ which should get most tokens // right.