forked from swiftlang/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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.
- Loading branch information
Showing
2 changed files
with
44 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters