From c86b984ea8ecb3e944dc3de48539f4c1f65851ea Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 18 Jan 2015 16:23:48 +0000 Subject: Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102 --- unittests/Basic/VirtualFileSystemTest.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'unittests/Basic/VirtualFileSystemTest.cpp') diff --git a/unittests/Basic/VirtualFileSystemTest.cpp b/unittests/Basic/VirtualFileSystemTest.cpp index e7d361e..67beb92 100644 --- a/unittests/Basic/VirtualFileSystemTest.cpp +++ b/unittests/Basic/VirtualFileSystemTest.cpp @@ -32,21 +32,15 @@ class DummyFileSystem : public vfs::FileSystem { public: DummyFileSystem() : FSID(getNextFSID()), FileID(0) {} - ErrorOr status(const Twine &Path) { + ErrorOr status(const Twine &Path) override { std::map::iterator I = FilesAndDirs.find(Path.str()); if (I == FilesAndDirs.end()) return make_error_code(llvm::errc::no_such_file_or_directory); return I->second; } - std::error_code openFileForRead(const Twine &Path, - std::unique_ptr &Result) { - llvm_unreachable("unimplemented"); - } - std::error_code getBufferForFile(const Twine &Name, - std::unique_ptr &Result, - int64_t FileSize = -1, - bool RequiresNullTerminator = true) { + ErrorOr> + openFileForRead(const Twine &Path) override { llvm_unreachable("unimplemented"); } @@ -539,8 +533,9 @@ public: IntrusiveRefCntPtr getFromYAMLRawString(StringRef Content, IntrusiveRefCntPtr ExternalFS) { - MemoryBuffer *Buffer = MemoryBuffer::getMemBuffer(Content); - return getVFSFromYAML(Buffer, CountingDiagHandler, this, ExternalFS); + std::unique_ptr Buffer = MemoryBuffer::getMemBuffer(Content); + return getVFSFromYAML(std::move(Buffer), CountingDiagHandler, this, + ExternalFS); } IntrusiveRefCntPtr getFromYAMLString( -- cgit v1.1