This is an archive of the discontinued LLVM Phabricator instance.

Fix PointerIntPair so that it can use an enum class as its integer template argument.
ClosedPublic

Authored by gottesmm on Jan 12 2016, 9:03 PM.

Details

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

Diff Detail

Event Timeline

gottesmm updated this revision to Diff 44705.Jan 12 2016, 9:03 PM
gottesmm retitled this revision from to Fix PointerIntPair so that it can use an enum class as its integer template argument..
gottesmm updated this object.
gottesmm added a reviewer: gribozavr.
gottesmm added a subscriber: llvm-commits.
gottesmm updated this revision to Diff 44708.Jan 12 2016, 9:51 PM

Removed an unneeded static cast.

gribozavr accepted this revision.Jan 12 2016, 10:00 PM
gribozavr edited edge metadata.

LGTM, thanks Michael!

This revision is now accepted and ready to land.Jan 12 2016, 10:00 PM
This revision was automatically updated to reflect the committed changes.