Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions llvm/include/llvm/ADT/PointerIntPair.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,10 @@ struct PointerIntPairInfo {
}

static intptr_t updateInt(intptr_t OrigValue, intptr_t Int) {
intptr_t IntWord = static_cast<intptr_t>(Int);
assert((IntWord & ~IntMask) == 0 && "Integer too large for field");
assert((Int & ~IntMask) == 0 && "Integer too large for field");

// Preserve all bits other than the ones we are updating.
return (OrigValue & ~ShiftedIntMask) | IntWord << IntShift;
return (OrigValue & ~ShiftedIntMask) | Int << IntShift;
}
};

Expand Down
Loading