diff options
author | David Blaikie <dblaikie@gmail.com> | 2016-05-23 17:35:51 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2016-05-23 17:35:51 +0000 |
commit | fb4915b80697341ca71b7ed5928f0716df77e534 (patch) | |
tree | 8e642ac1d05ab3b395d1567d0932f6c79adf9ac3 /tools/llvm-dwp | |
parent | 2123d3f9050c9e722daa6c6c3ef69067c3da3a01 (diff) |
llvm-dwp: Ensure compressed sections are preserved long enough for use in the string pool
Now that the string pool is referential rather than maintaining its own
copy of string data, compressed sections (well, technically only the
debug_str section*) need to be preserved for the lifetime of the pool to
match.
* I'm not currently optimizing for memory footprint with compressed
input - the major memory limit I'm hitting is on dwp+dwp merge steps
and we aren't currently compressing contents in dwp files, just in the
.dwo inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-dwp')
-rw-r--r-- | tools/llvm-dwp/llvm-dwp.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-dwp/llvm-dwp.cpp b/tools/llvm-dwp/llvm-dwp.cpp index 9a43420f710..b88f0ef37d7 100644 --- a/tools/llvm-dwp/llvm-dwp.cpp +++ b/tools/llvm-dwp/llvm-dwp.cpp @@ -395,6 +395,8 @@ static Error write(MCStreamer &Out, ArrayRef<std::string> Inputs) { SmallVector<OwningBinary<object::ObjectFile>, 128> Objects; Objects.reserve(Inputs.size()); + SmallVector<SmallString<32>, 4> UncompressedSections; + for (const auto &Input : Inputs) { auto ErrOrObj = object::ObjectFile::createObjectFile(Input); if (!ErrOrObj) @@ -413,8 +415,6 @@ static Error write(MCStreamer &Out, ArrayRef<std::string> Inputs) { StringRef CurCUIndexSection; StringRef CurTUIndexSection; - SmallVector<SmallString<32>, 4> UncompressedSections; - for (const auto &Section : Obj.sections()) { if (Section.isBSS()) continue; |