Fixing compile errors related to changes with MemoryBuffer::getFile.
authorAaron Ballman <aaron@aaronballman.com>
Sun, 6 Jul 2014 19:34:52 +0000 (19:34 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Sun, 6 Jul 2014 19:34:52 +0000 (19:34 +0000)
llvm-svn: 212415

llvm/unittests/Support/Path.cpp

index da1bd22..1a70772 100644 (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)));
 }