From 0a4d43379ead9ca3014ba71bb68b0db08e7e7e94 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Mon, 29 Aug 2011 15:27:01 -0700 Subject: rt: Move to a custom alignof since __alignof__ returns the "preferred" alignment rather than the one that gets used in structs --- src/rt/rust_shape.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rt/rust_shape.cpp') diff --git a/src/rt/rust_shape.cpp b/src/rt/rust_shape.cpp index c08663bface..e80512b92a0 100644 --- a/src/rt/rust_shape.cpp +++ b/src/rt/rust_shape.cpp @@ -199,7 +199,7 @@ size_of::compute_tag_size(tag_info &tinfo) { tinfo.tag_sa.set(1, 1); } else { // Add in space for the tag. - tinfo.tag_sa.add(sizeof(uint32_t), ALIGNOF(uint32_t)); + tinfo.tag_sa.add(sizeof(uint32_t), alignof()); } } @@ -259,7 +259,7 @@ private: } inline void cmp_two_pointers(bool align) { - if (align) dp = align_to(dp, ALIGNOF(uint8_t *) * 2); + if (align) dp = align_to(dp, alignof() * 2); data_pair fst = bump_dp(dp); data_pair snd = bump_dp(dp); cmp_number(fst); @@ -268,7 +268,7 @@ private: } inline void cmp_pointer(bool align) { - if (align) dp = align_to(dp, ALIGNOF(uint8_t *)); + if (align) dp = align_to(dp, alignof()); cmp_number(bump_dp(dp)); } -- cgit 1.4.1-3-g733a5