Fix PointerIntPair so that it can use an enum class as its integer template argument.
authorMichael Gottesman <mgottesman@apple.com>
Wed, 13 Jan 2016 05:59:13 +0000 (05:59 +0000)
committerMichael Gottesman <mgottesman@apple.com>
Wed, 13 Jan 2016 05:59:13 +0000 (05:59 +0000)
commit2fbc59f8d0013311a95ca04abccae56c22f879ef
tree881086727c88d8545b17c984f610eb6ad2d6316e
parent8d4101c8c9aa79c0dbdad555d8122040b02042df
Fix PointerIntPair so that it can use an enum class as its integer template argument.

Summary:
The problem here is that an enum class can not be implicitly converted to an
integer. That assumption snuck back into PointerIntPair. This commit fixes the
issue and more importantly adds some unittests to make sure that we do not break
this again.

rdar://23594806

Reviewers: gribozavr

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16131

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257574 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/PointerIntPair.h
unittests/ADT/PointerIntPairTest.cpp