[PATCH] Add ability for can_write to indicate why the file is not writable

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Sep 11 10:37:40 PDT 2014


> What do we lose by getting rid of that first case entirely, because
> the second case already has to handle the exact same problems
> regardless? Eg) File exists and can be written to, passing your first
> checks, but when we attempt to produce/copy the temp file and that
> fails because the file has been deleted or been flagged as not
> writable.

+1

Even if producing the temporary is expensive, how common is the
failure? If not common it is probably worth the simplicity to simply
try to copy.

Cheers,
Rafael



More information about the llvm-commits mailing list