[clang][deps] Ensure deterministic order of TU '-fmodule-file=' arguments
authorJan Svoboda <jan_svoboda@apple.com>
Wed, 25 Aug 2021 08:56:15 +0000 (10:56 +0200)
committerJan Svoboda <jan_svoboda@apple.com>
Wed, 25 Aug 2021 09:14:16 +0000 (11:14 +0200)
commitb5088cb408222eba4611e6121293166904ca48e6
treeb90c2d830965bab224da6373195fed390de949f6
parente2217247146afa13b886d80e75c8e717f9f56aa7
[clang][deps] Ensure deterministic order of TU '-fmodule-file=' arguments

Translation units with multiple direct modular dependencies trigger a non-deterministic ordering in `clang-scan-deps`. This boils down to usage of `std::unordered_map`, which gets replaced by `std::map` in this patch.

Depends on D103526.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D103807
clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
clang/test/ClangScanDeps/modules-pch.c