mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-26 07:29: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:
parent
84be3d5a73
commit
5d295b41a3
@ -430,7 +430,8 @@ private:
|
||||
incrementNumEntries();
|
||||
|
||||
// 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();
|
||||
|
||||
return TheBucket;
|
||||
|
Loading…
Reference in New Issue
Block a user