diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2018-06-04 20:38:23 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2018-06-04 20:38:23 +0000 |
commit | f52318b47b333126c862d9a973d6e59ccaf713dc (patch) | |
tree | 7859cdba92b95d143927b8a5b11466c1cfc071f3 /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | |
parent | ba81d7f1ebfd30bf354390f8656211041d53c176 (diff) | |
download | llvm-f52318b47b333126c862d9a973d6e59ccaf713dc.zip llvm-f52318b47b333126c862d9a973d6e59ccaf713dc.tar.gz llvm-f52318b47b333126c862d9a973d6e59ccaf713dc.tar.bz2 |
Fix a strict aliasing violation in map and unordered_map.
These containers type-punned between pair<K, V> and pair<const K, V> as an
optimization. This commit instead provides access to the pair via a pair of
references that assign through to the underlying object. It's still undefined to
mutate a const object, but clang doesn't optimize on this for data members, so
this should be safe.
Differential revision: https://reviews.llvm.org/D47607
llvm-svn: 333948
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
0 files changed, 0 insertions, 0 deletions