Make VFS and FileManager match the current MemoryBuffer API.

This eliminates converting back and forth between the 3 formats and
gives us a more homogeneous interface.

llvm-svn: 220657
This commit is contained in:
Benjamin Kramer
2014-10-26 22:44:13 +00:00
parent 789d29df34
commit a885796d5f
18 changed files with 133 additions and 185 deletions

View File

@@ -39,14 +39,8 @@ public:
return make_error_code(llvm::errc::no_such_file_or_directory);
return I->second;
}
std::error_code openFileForRead(const Twine &Path,
std::unique_ptr<vfs::File> &Result) override {
llvm_unreachable("unimplemented");
}
std::error_code getBufferForFile(const Twine &Name,
std::unique_ptr<MemoryBuffer> &Result,
int64_t FileSize = -1,
bool RequiresNullTerminator = true) {
ErrorOr<std::unique_ptr<vfs::File>>
openFileForRead(const Twine &Path) override {
llvm_unreachable("unimplemented");
}