From 80b96d1a76790527f72a660ac03d9c215eed17ce Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 19 Feb 2015 15:50:28 +0000 Subject: Replace a few std::vector with ArenaVector in Mir2Lir. Change-Id: I7867d60afc60f57cdbbfd312f02883854d65c805 --- runtime/utils.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'runtime/utils.h') diff --git a/runtime/utils.h b/runtime/utils.h index 0fbc9df5a7..3191e7d305 100644 --- a/runtime/utils.h +++ b/runtime/utils.h @@ -546,7 +546,13 @@ class VoidFunctor { } }; -void PushWord(std::vector* buf, int32_t data); +template +void Push32(std::vector* buf, int32_t data) { + buf->push_back(data & 0xff); + buf->push_back((data >> 8) & 0xff); + buf->push_back((data >> 16) & 0xff); + buf->push_back((data >> 24) & 0xff); +} void EncodeUnsignedLeb128(uint32_t data, std::vector* buf); void EncodeSignedLeb128(int32_t data, std::vector* buf); -- cgit v1.2.3-59-g8ed1b