Displaying 1 result from an estimated 1 matches for "intword".
Did you mean:
idtword
2018 Apr 05
1
llvm::PointerIntPair -- is this by design or a bug?
I do agree that sign-extension is the right thing to do. Unlike bit-fields, llvm::PointerIntPair has asserts checking that the int value is within range. So if you assign an out of range value, it should fail with an assertion:
llvm::PointerIntPair<SomeType*, 3, int> pip;
pip.setInt(7); // can be made to fail as the valid range
// of signed 3-bit values is [-4:3]
The above