This is an archive of the discontinued LLVM Phabricator instance.

[LockFileManager] Improve error output by adding error messages
ClosedPublic

Authored by bruno on Jun 2 2016, 5:50 PM.

Details

Reviewers
benlangmuir
Summary

This is currently used by clang to lock access to modules; improve the error message so that clang can use better output messages from locking error issues.

Diff Detail

Event Timeline

bruno updated this revision to Diff 59482.Jun 2 2016, 5:50 PM
bruno retitled this revision from to [LockFileManager] Improve error output by adding error messages.
bruno updated this object.
bruno added a reviewer: benlangmuir.
bruno added subscribers: cfe-commits, dexonsmith.
bruno added a subscriber: llvm-commits.

Adding the right list for this +llvm-commits

benlangmuir accepted this revision.Jun 2 2016, 9:39 PM
benlangmuir edited edge metadata.

LGTM. Some minor suggestions.

include/llvm/Support/LockFileManager.h
87

Get the error message, or "" if there is no error.

lib/Support/LockFileManager.cpp
193

"failed to write to <file>"?

263

if you return OSS.str() you don't need the flush call

This revision is now accepted and ready to land.Jun 2 2016, 9:39 PM
bruno closed this revision.Jun 3 2016, 5:41 PM

Applied your suggestions and committed in r271755!

Thanks