#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cstdint>
+#include <deque>
#include <map>
#include <string>
#include <utility>
StringRef TUIndexSection;
StringRef LineStringSection;
- SmallVector<SmallString<32>, 4> UncompressedSections;
+ // A deque holding section data whose iterators are not invalidated when
+ // new decompressed sections are inserted at the end.
+ std::deque<SmallString<0>> UncompressedSections;
StringRef *mapSectionToMember(StringRef Name) {
if (DWARFSection *Sec = mapNameToDWARFSection(Name))
if (!Decompressor)
return Decompressor.takeError();
- SmallString<32> Out;
+ SmallString<0> Out;
if (auto Err = Decompressor->resizeAndDecompress(Out))
return Err;
- UncompressedSections.emplace_back(std::move(Out));
+ UncompressedSections.push_back(std::move(Out));
Data = UncompressedSections.back();
return Error::success();