diff options
author | Louis Dionne <ldionne@apple.com> | 2020-10-09 10:08:02 -0400 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2020-10-09 10:22:46 -0400 |
commit | ddb2baf9fbff3d574c6c2bd69c2c9569100509a4 (patch) | |
tree | f1f54609befe979db19c400849f28b3ca0387190 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 63ca276dc64f3869aec9a05250bd64b8f423ab44 (diff) | |
download | llvm-ddb2baf9fbff3d574c6c2bd69c2c9569100509a4.zip llvm-ddb2baf9fbff3d574c6c2bd69c2c9569100509a4.tar.gz llvm-ddb2baf9fbff3d574c6c2bd69c2c9569100509a4.tar.bz2 |
[libc++] Make sure we don't cache DSL functions too aggressively
To make sure we don't store a mutable object (which could be modified by
outside code without us noticing) as the cache key, we pickle the cache
key to get a byte stream. If two keys are unequal, we know for sure they
will not have the same pickling. And if they are equal, there's a large
chance they will have the same pickling. If they don't, we might end up
not reusing a cached entry when we could have, but at least the behavior
we'll have is semantically correct.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions