aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/AlignOf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/AlignOf.h')
-rw-r--r--include/llvm/Support/AlignOf.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Support/AlignOf.h b/include/llvm/Support/AlignOf.h
index 108c59f..aecb478 100644
--- a/include/llvm/Support/AlignOf.h
+++ b/include/llvm/Support/AlignOf.h
@@ -34,7 +34,8 @@ private:
/// compile-time constant (e.g., for template instantiation).
template <typename T>
struct AlignOf {
- enum { Alignment = sizeof(AlignmentCalcImpl<T>) - sizeof(T) };
+ enum { Alignment =
+ static_cast<unsigned int>(sizeof(AlignmentCalcImpl<T>) - sizeof(T)) };
enum { Alignment_GreaterEqual_2Bytes = Alignment >= 2 ? 1 : 0 };
enum { Alignment_GreaterEqual_4Bytes = Alignment >= 4 ? 1 : 0 };