Skip to content

Commit e9b6cbe

Browse files
committed
[lldb] Fix compilation of CppModuleConfigurationTest
901966c updated the test but the backport commit was missing some changes to make the patch compile.
1 parent 0a62b51 commit e9b6cbe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/unittests/Expression/CppModuleConfigurationTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ using namespace lldb_private;
2020

2121
namespace {
2222
struct CppModuleConfigurationTest : public testing::Test {
23-
llvm::MemoryBufferRef m_empty_buffer;
23+
std::unique_ptr<llvm::MemoryBuffer> m_empty_buffer;
2424
llvm::IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> m_fs;
2525

2626
CppModuleConfigurationTest()
27-
: m_empty_buffer("", "<empty buffer>"),
27+
: m_empty_buffer(llvm::MemoryBuffer::getMemBuffer("", "<empty buffer>")),
2828
m_fs(new llvm::vfs::InMemoryFileSystem()) {}
2929

3030
void SetUp() override {
@@ -42,7 +42,7 @@ struct CppModuleConfigurationTest : public testing::Test {
4242
FileSpecList result;
4343
for (const std::string &path : paths) {
4444
result.Append(FileSpec(path, FileSpec::Style::posix));
45-
if (!m_fs->addFileNoOwn(path, static_cast<time_t>(0), m_empty_buffer))
45+
if (!m_fs->addFileNoOwn(path, static_cast<time_t>(0), m_empty_buffer.get()))
4646
llvm_unreachable("Invalid test configuration?");
4747
}
4848
return result;

0 commit comments

Comments
 (0)