diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-08-29 15:27:01 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-08-29 16:24:03 -0700 |
| commit | 0a4d43379ead9ca3014ba71bb68b0db08e7e7e94 (patch) | |
| tree | db8cd2451dc58ce9cd1dd1677610321f7afca799 /src/rt/rust_shape.cpp | |
| parent | b16a9a984a23ec607ec652286df8bd60ada83047 (diff) | |
| download | rust-0a4d43379ead9ca3014ba71bb68b0db08e7e7e94.tar.gz rust-0a4d43379ead9ca3014ba71bb68b0db08e7e7e94.zip | |
rt: Move to a custom alignof since __alignof__ returns the "preferred" alignment rather than the one that gets used in structs
Diffstat (limited to 'src/rt/rust_shape.cpp')
| -rw-r--r-- | src/rt/rust_shape.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<uint32_t>()); } } @@ -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<uint8_t *>() * 2); data_pair<uint8_t *> fst = bump_dp<uint8_t *>(dp); data_pair<uint8_t *> snd = bump_dp<uint8_t *>(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<uint8_t *>()); cmp_number(bump_dp<uint8_t *>(dp)); } |
