mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-25 21:45:21 +00:00
fe303ed1b8
Richard Smith identified this in post commit review of r270466. The string sections in particular (in the future, possibly all sections - so I'm not going to bother pulling out just the string sections for the extra lifetime handling right now) need to remain valid during processing of all inputs so that elements of the DWPStringPool can be looked up repeatedly without having to make in-memory copies of string contents in the noncompressed case (more common in dwp+dwp merge steps where the memory is a bigger problem because the files are larger). Using the SmallVector (or any vector) a reallocation on push_back could cause any of the nested SmallStrings in small mode to move in memory and invalid pointers to their contents. Using a deque the SmallStrings will never move around since no elements are removed from the container. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270797 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
DWPError.cpp | ||
DWPError.h | ||
DWPStringPool.h | ||
llvm-dwp.cpp | ||
LLVMBuild.txt |