mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
DenseMap: Appease -fstrict-aliasing on g++-4.4.
With DenseMapInfo<Enum>, it is miscompiled on g++-4.4. static inline Enum getEmptyKey() { return Enum(<arbitrary int/unsigned value>); } isEauql(getEmptyKey(), ...) The compiler mis-assumes the return value is not aliased to Enum. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171600 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -430,7 +430,8 @@ private:
|
|||||||
incrementNumEntries();
|
incrementNumEntries();
|
||||||
|
|
||||||
// If we are writing over a tombstone, remember this.
|
// If we are writing over a tombstone, remember this.
|
||||||
if (!KeyInfoT::isEqual(TheBucket->first, getEmptyKey()))
|
const KeyT EmptyKey = getEmptyKey();
|
||||||
|
if (!KeyInfoT::isEqual(TheBucket->first, EmptyKey))
|
||||||
decrementNumTombstones();
|
decrementNumTombstones();
|
||||||
|
|
||||||
return TheBucket;
|
return TheBucket;
|
||||||
|
Reference in New Issue
Block a user