1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

BitstreamWriter: Use SmallVector::append instead of multiple push_back calls.

llvm-svn: 151755
This commit is contained in:
Daniel Dunbar 2012-02-29 21:02:05 +00:00
parent 1105208aec
commit 0f3c632848

View File

@ -74,10 +74,12 @@ class BitstreamWriter {
}
void WriteWord(unsigned Value) {
Out.push_back((unsigned char)(Value >> 0));
Out.push_back((unsigned char)(Value >> 8));
Out.push_back((unsigned char)(Value >> 16));
Out.push_back((unsigned char)(Value >> 24));
unsigned char Bytes[4] = {
(unsigned char)(Value >> 0),
(unsigned char)(Value >> 8),
(unsigned char)(Value >> 16),
(unsigned char)(Value >> 24) };
Out.append(&Bytes[0], &Bytes[4]);
}
unsigned GetBufferOffset() const {