This is an archive of the discontinued LLVM Phabricator instance.

Add disk_space() to llvm::fs
ClosedPublic

Authored by mehdi_amini on Mar 24 2016, 5:17 PM.

Diff Detail

Event Timeline

mehdi_amini retitled this revision from to Add disk_space() to llvm::fs.
mehdi_amini updated this object.
mehdi_amini added reviewers: bruno, silvas.
mehdi_amini added a subscriber: llvm-commits.

Can you return an ErrorOr or Expected?

Use ErrorOr in the API

rafael accepted this revision.Mar 27 2016, 9:41 AM
rafael added a reviewer: rafael.

LGTM with nits.

lib/Support/Unix/Path.inc
217

Put STATVFS_F_FRSIZE(Vfs) in a variable. It is used 3 times.

git-clang-format the patch.

lib/Support/Windows/Path.inc
155

Avail, Total, Free.

This revision is now accepted and ready to land.Mar 27 2016, 9:41 AM

Is there a reason we need this API?

mehdi_amini marked 2 inline comments as done.
mehdi_amini edited edge metadata.

clang-format (note: git clang-format does not run on .inc, I had to trick it)

Add two notes in the doxygen for Aaron comment (TOUTOC and windows quotas).

ruiu added a subscriber: ruiu.Mar 31 2016, 1:57 PM
ruiu added inline comments.
include/llvm/Support/FileSystem.h
653

"reports reports"

660

const Twine Path -> const Twine &Path?

ruiu added inline comments.Mar 31 2016, 1:58 PM
include/llvm/Support/FileSystem.h
653

Ignore this comment -- I misread it.

mehdi_amini closed this revision.Mar 31 2016, 4:29 PM

r265068 (and r265074 for the Twine reference)