[clang][deps] Preserve input ordering in the full output
This patch makes sure the ordering of TUs in the input CDB is preserved in the full output. Previously, the results were pushed into a global vector, potentially out-of-order and then sorted by the input file name. This is non-deterministic when the CDB contains multiple entries with the same input file. This patch fixes that by pre-allocating the output vector and writing directly to the position corresponding to the current input. This also eliminates one critical section. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D145098
Loading
Please sign in to comment