[Modules] Start making explicit modules produce deterministic output.There are two aspects of non-determinism fixed here, which was theminimum required to cause at least an empty module to be dete
[Modules] Start making explicit modules produce deterministic output.There are two aspects of non-determinism fixed here, which was theminimum required to cause at least an empty module to be deterministic.First, the random number signature is only inserted into the module whenwe are building modules implicitly. The use case for these randomsignatures is to work around the very fact that modules are notdeterministic in their output when working with the implicitly built andpopulated module cache. Eventually this should go away entirely whenwe're confident that Clang is producing deterministic output.Second, the on-disk hash table is populated based on the order ofiteration over a DenseMap. Instead, use a MapVector so that we can walkit in insertion order.I've added a test that an empty module, when built twice, produces thesame binary PCM file.llvm-svn: 233115
show more ...