mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
BitstreamWriter: Use SmallVector::append instead of multiple push_back calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151755 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -74,10 +74,12 @@ class BitstreamWriter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WriteWord(unsigned Value) {
|
void WriteWord(unsigned Value) {
|
||||||
Out.push_back((unsigned char)(Value >> 0));
|
unsigned char Bytes[4] = {
|
||||||
Out.push_back((unsigned char)(Value >> 8));
|
(unsigned char)(Value >> 0),
|
||||||
Out.push_back((unsigned char)(Value >> 16));
|
(unsigned char)(Value >> 8),
|
||||||
Out.push_back((unsigned char)(Value >> 24));
|
(unsigned char)(Value >> 16),
|
||||||
|
(unsigned char)(Value >> 24) };
|
||||||
|
Out.append(&Bytes[0], &Bytes[4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned GetBufferOffset() const {
|
unsigned GetBufferOffset() const {
|
||||||
|
Reference in New Issue
Block a user