[PATCH] D106052: [flang][driver] Randomise the names of the temporary unparsed files

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 04:20:13 PDT 2021


DavidSpickett added inline comments.


================
Comment at: flang/tools/f18/flang.in:331
+  # invocation. Otherwise we can't use this script in parallel.
+  RANDOM=$(date +%N | cut -b4-9)
+  local -r unparsed_file_base="flang_unparsed_source_file_$RANDOM"
----------------
Wouldn't date/time have a small chance to collide?

Would something like `/proc/sys/kernel/random/uuid` be better to guarantee that each one is unique?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106052



More information about the llvm-commits mailing list