Fixing compile errors related to changes with MemoryBuffer::getFile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212415 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Aaron Ballman 2014-07-06 19:34:52 +00:00
parent 7cba2a973f
commit d08df5a1c5

View File

@ -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)));
}