summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Support/Alignment.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/Alignment.h b/llvm/include/llvm/Support/Alignment.h
index 6925cb52d00..72fad87dd0d 100644
--- a/llvm/include/llvm/Support/Alignment.h
+++ b/llvm/include/llvm/Support/Alignment.h
@@ -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);
}
OpenPOWER on IntegriCloud