projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95b38ae
)
BitstreamWriter: Use SmallVector::append instead of multiple push_back calls.
author
Daniel Dunbar
<daniel@zuster.org>
Wed, 29 Feb 2012 21:02:05 +0000
(21:02 +0000)
committer
Daniel Dunbar
<daniel@zuster.org>
Wed, 29 Feb 2012 21:02:05 +0000
(21:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151755
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Bitcode/BitstreamWriter.h
patch
|
blob
|
history
diff --git
a/include/llvm/Bitcode/BitstreamWriter.h
b/include/llvm/Bitcode/BitstreamWriter.h
index 55e3cd390b1289dcf4b518768cfb6f82ea3a964c..42c68aac7d7b84e8e0c17505f54fd782fbb53236 100644
(file)
--- a/
include/llvm/Bitcode/BitstreamWriter.h
+++ b/
include/llvm/Bitcode/BitstreamWriter.h
@@
-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 {