llvm-project/llvm/tools/llvm-dwp
David Blaikie 1fc3e6bda2 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.

llvm-svn: 270797
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
LLVMBuild.txt
llvm-dwp.cpp llvm-dwp: Ensure uncompressed sections are not relocated during processing of later inputs 2016-05-25 23:37:06 +00:00