diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-02-29 20:31:09 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-02-29 20:31:09 +0000 |
commit | acbceeae4d7bdfbbc3437c60a5a3e26449888a15 (patch) | |
tree | b12362a7581d05d67c62db9b1ea09c1af039c040 /include/llvm/Bitcode | |
parent | a8d16bbdfba55b309234cecbabad015a13683781 (diff) | |
download | external_llvm-acbceeae4d7bdfbbc3437c60a5a3e26449888a15.zip external_llvm-acbceeae4d7bdfbbc3437c60a5a3e26449888a15.tar.gz external_llvm-acbceeae4d7bdfbbc3437c60a5a3e26449888a15.tar.bz2 |
BitstreamWriter: Change primary output buffer to be a SmallVector instead of an
std::vector.
- Good for 1-2% speedup on writing PCH for Cocoa.h.
- Clang side API match to follow shortly, there wasn't an easy way to make this
non-breaking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode')
-rw-r--r-- | include/llvm/Bitcode/BitstreamWriter.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Bitcode/BitstreamWriter.h b/include/llvm/Bitcode/BitstreamWriter.h index 56b20c8..55e3cd3 100644 --- a/include/llvm/Bitcode/BitstreamWriter.h +++ b/include/llvm/Bitcode/BitstreamWriter.h @@ -16,13 +16,14 @@ #define BITSTREAM_WRITER_H #include "llvm/ADT/StringRef.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/Bitcode/BitCodes.h" #include <vector> namespace llvm { class BitstreamWriter { - std::vector<unsigned char> &Out; + SmallVectorImpl<char> &Out; /// CurBit - Always between 0 and 31 inclusive, specifies the next bit to use. unsigned CurBit; @@ -90,7 +91,7 @@ class BitstreamWriter { } public: - explicit BitstreamWriter(std::vector<unsigned char> &O) + explicit BitstreamWriter(SmallVectorImpl<char> &O) : Out(O), CurBit(0), CurValue(0), CurCodeSize(2) {} ~BitstreamWriter() { |