DenseMap: Appease -fstrict-aliasing on g++-4.4.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 5 Jan 2013 05:14:23 +0000 (05:14 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 5 Jan 2013 05:14:23 +0000 (05:14 +0000)
commit5d295b41a3f4194778b6bc01a828b2115bd3a3f1
tree510d116669ee45c96af52db1e5598607c9581652
parent84be3d5a73313eb19f2f9e0512153cd2e6f46c54
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
include/llvm/ADT/DenseMap.h