...and when you try to store negative values in it. Seems pretty straightforward.
(Background: I'm replacing uses of Swift's similar type Fixnum with PointerEmbeddedInt.)
Paths
| Differential D17207
[ADT] Fix PointerEmbeddedInt when the underlying type is uintptr_t.
ClosedPublic Authored by jordan_rose on Feb 12 2016, 11:58 AM.
Details
Diff Detail Event Timelinejordan_rose retitled this revision from to [ADT] Fix PointerEmbeddedInt when the underlying type is uintptr_t.
. jordan_rose updated this object.
chandlerc edited edge metadata. Comment ActionsLGTM
This revision is now accepted and ready to land.Feb 18 2016, 12:49 PM Comment Actions Committed in r261259 with a slightly more conservative RawValue definition. Will be watching bots.
Revision Contents
Diff 47838 include/llvm/ADT/PointerEmbeddedInt.h
unittests/ADT/PointerEmbeddedIntTest.cpp
|
Rather than this, use an empty struct? That's a better tag type as it is literally not passed in the ABI, just changes the overload resolution at compile time.
The _t suffix is also not terribly common in LLVM. I'd go with 'RawValueTag' personally.