[llvm] r212415 - Fixing compile errors related to changes with MemoryBuffer::getFile.
Aaron Ballman
aaron at aaronballman.com
Sun Jul 6 12:34:53 PDT 2014
Author: aaronballman
Date: Sun Jul 6 14:34:52 2014
New Revision: 212415
URL: http://llvm.org/viewvc/llvm-project?rev=212415&view=rev
Log:
Fixing compile errors related to changes with MemoryBuffer::getFile.
Modified:
llvm/trunk/unittests/Support/Path.cpp
Modified: llvm/trunk/unittests/Support/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Path.cpp?rev=212415&r1=212414&r2=212415&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/Path.cpp (original)
+++ llvm/trunk/unittests/Support/Path.cpp Sun Jul 6 14:34:52 2014
@@ -558,9 +558,9 @@ TEST_F(FileSystemTest, CarriageReturn) {
File << '\n';
}
{
- std::unique_ptr<MemoryBuffer> Buf;
- MemoryBuffer::getFile(FilePathname.c_str(), Buf);
- EXPECT_EQ(Buf->getBuffer(), "\r\n");
+ auto Buf = MemoryBuffer::getFile(FilePathname.c_str());
+ EXPECT_FALSE(Buf);
+ EXPECT_EQ(Buf.get()->getBuffer(), "\r\n");
}
{
@@ -569,9 +569,9 @@ TEST_F(FileSystemTest, CarriageReturn) {
File << '\n';
}
{
- std::unique_ptr<MemoryBuffer> Buf;
- MemoryBuffer::getFile(FilePathname.c_str(), Buf);
- EXPECT_EQ(Buf->getBuffer(), "\n");
+ auto Buf = MemoryBuffer::getFile(FilePathname.c_str());
+ EXPECT_FALSE(Buf);
+ EXPECT_EQ(Buf.get()->getBuffer(), "\n");
}
ASSERT_NO_ERROR(fs::remove(Twine(FilePathname)));
}
More information about the llvm-commits
mailing list