llvm/tools/llvm-dwp
David Blaikie fe303ed1b8 llvm-dwp: Ensure uncompressed sections are not relocated during processing of later inputs
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
2016-05-25 23:37:06 +00:00
..
CMakeLists.txt llvm-dwp: Use llvm::Error to improve diagnostic quality/error handling in llvm-dwp 2016-05-12 19:59:54 +00:00
DWPError.cpp llvm-dwp: Use llvm::Error to improve diagnostic quality/error handling in llvm-dwp 2016-05-12 19:59:54 +00:00
DWPError.h llvm-dwp: Add an abstraction for the DWP string pool 2016-05-23 16:32:11 +00:00
DWPStringPool.h llvm-dwp: Fix the build by moving DWPStringPool into the llvm namespace 2016-05-23 16:45:00 +00:00
llvm-dwp.cpp llvm-dwp: Ensure uncompressed sections are not relocated during processing of later inputs 2016-05-25 23:37:06 +00:00
LLVMBuild.txt