aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/Path.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-07-06 19:34:52 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-07-06 19:34:52 +0000
commite56fe8af86f81209f433ca09dfba2cc834c9925f (patch)
treee3efed3525b27fee0c398d16995b727376a3a291 /llvm/unittests/Support/Path.cpp
parent7e36a19b20b8e97ae4d1805208f40f881b0e25ab (diff)
downloadllvm-e56fe8af86f81209f433ca09dfba2cc834c9925f.zip
llvm-e56fe8af86f81209f433ca09dfba2cc834c9925f.tar.gz
llvm-e56fe8af86f81209f433ca09dfba2cc834c9925f.tar.bz2
Fixing compile errors related to changes with MemoryBuffer::getFile.
llvm-svn: 212415
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
-rw-r--r--llvm/unittests/Support/Path.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index da1bd22..1a70772 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/unittests/Support/Path.cpp
@@ -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)));
}