This is an archive of the discontinued LLVM Phabricator instance.

Support, LTO: When pruning a directory, ignore files not matching a prefix.
ClosedPublic

Authored by pcc on Mar 17 2017, 4:25 PM.

Details

Summary

This is a safeguard against data loss if the user specifies a directory
that is not a cache directory. Teach the existing cache pruning clients
to create files with appropriate names.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Mar 17 2017, 4:25 PM

Generally, looks good, modulo the comment.

llvm/lib/Support/CachePruning.cpp
193 ↗(On Diff #92223)

We should just ignore files not created by LLVM. If a user decided to put something there, then she has a reason. And there's no actual harm to our code, if these files exist but ignored.

pcc updated this revision to Diff 92243.Mar 17 2017, 7:44 PM
pcc marked an inline comment as done.
  • Address review comments
llvm/lib/Support/CachePruning.cpp
193 ↗(On Diff #92223)

Makes sense, done.

pcc retitled this revision from Support, LTO: Error out when pruning a directory containing files not matching a prefix. to Support, LTO: When pruning a directory, ignore files not matching a prefix..Mar 17 2017, 7:44 PM
krasin accepted this revision.Mar 20 2017, 9:00 AM

Thank you, Peter!

This revision is now accepted and ready to land.Mar 20 2017, 9:00 AM
This revision was automatically updated to reflect the committed changes.