aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-03-24 21:18:10 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-03-24 21:18:10 +0000
commit885e78cb22dcfd882c1d54082569573cc17de6c7 (patch)
treeb91ca7210bd9295d26c5f98c5073f3c5cf0b2e0a /clang/lib/Frontend/CompilerInstance.cpp
parentd0aa59f77f3a8db0cabbe796e5d7ed68ae713d22 (diff)
downloadllvm-885e78cb22dcfd882c1d54082569573cc17de6c7.zip
llvm-885e78cb22dcfd882c1d54082569573cc17de6c7.tar.gz
llvm-885e78cb22dcfd882c1d54082569573cc17de6c7.tar.bz2
[Modules] Start making explicit modules produce deterministic output.
There are two aspects of non-determinism fixed here, which was the minimum required to cause at least an empty module to be deterministic. First, the random number signature is only inserted into the module when we are building modules implicitly. The use case for these random signatures is to work around the very fact that modules are not deterministic in their output when working with the implicitly built and populated module cache. Eventually this should go away entirely when we're confident that Clang is producing deterministic output. Second, the on-disk hash table is populated based on the order of iteration over a DenseMap. Instead, use a MapVector so that we can walk it in insertion order. I've added a test that an empty module, when built twice, produces the same binary PCM file. llvm-svn: 233115
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
0 files changed, 0 insertions, 0 deletions