mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-07 11:51:13 +00:00
Try to fix the assert in Alignment::alignAddr to work on 32-bit
Hopefully fixing the AlignmentDeathTest.AlignAddr failures (e.g. at http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/10925) llvm-svn: 375090
This commit is contained in:
parent
8cc28e1080
commit
666e447cb4
@ -183,7 +183,8 @@ inline uint64_t alignTo(uint64_t Size, MaybeAlign A) {
|
||||
/// Aligns `Addr` to `Alignment` bytes, rounding up.
|
||||
inline uintptr_t alignAddr(const void *Addr, Align Alignment) {
|
||||
uintptr_t ArithAddr = reinterpret_cast<uintptr_t>(Addr);
|
||||
assert(ArithAddr + Alignment.value() - 1 >= ArithAddr && "Overflow");
|
||||
assert(static_cast<uintptr_t>(ArithAddr + Alignment.value() - 1) >=
|
||||
ArithAddr && "Overflow");
|
||||
return alignTo(ArithAddr, Alignment);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user