diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
| commit | 044eb2f6afba375a914ac9d8024f8f5142bb912e (patch) | |
| tree | 1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /include/llvm/DebugInfo/CodeView/SymbolSerializer.h | |
| parent | eb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff) | |
Notes
Diffstat (limited to 'include/llvm/DebugInfo/CodeView/SymbolSerializer.h')
| -rw-r--r-- | include/llvm/DebugInfo/CodeView/SymbolSerializer.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/DebugInfo/CodeView/SymbolSerializer.h b/include/llvm/DebugInfo/CodeView/SymbolSerializer.h index b63ced5217b4..f4d8ab0c3c2e 100644 --- a/include/llvm/DebugInfo/CodeView/SymbolSerializer.h +++ b/include/llvm/DebugInfo/CodeView/SymbolSerializer.h @@ -28,7 +28,10 @@ namespace codeview { class SymbolSerializer : public SymbolVisitorCallbacks { BumpPtrAllocator &Storage; - std::vector<uint8_t> RecordBuffer; + // Since this is a fixed size buffer, use a stack allocated buffer. This + // yields measurable performance increase over the repeated heap allocations + // when serializing many independent records via writeOneSymbol. + std::array<uint8_t, MaxRecordLength> RecordBuffer; MutableBinaryByteStream Stream; BinaryStreamWriter Writer; SymbolRecordMapping Mapping; |
