[PATCH] D100116: Reuse temporary files for print-changed=diff.

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 10:33:56 PDT 2021


jamieschmeiser added a comment.

They already are removed; see the clean up section of code at the end of the function.

I took a quick look at the sys::fs code and it looks like The call to createTemporaryFile creates a random filename by randomly substituting the characters 0-9,a-f on the parameters to get a new name.  I think it just runs out of permutations of names to try.  A large compile could result in 10,000+ diffs/names and it has a limited number of attempts to find a name (128?) to avoid infinite loop/race conditions.  It seems that once an error occurs, it gets nothing but errors afterward so it probably just gives up trying.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100116/new/

https://reviews.llvm.org/D100116



More information about the llvm-commits mailing list