std::vector<StringRef> Filenames;
std::vector<CounterExpression> Expressions;
std::vector<CounterMappingRegion> Regions;
+ llvm::SmallVector<std::string, 16> FilenameStrs;
llvm::SmallVector<StringRef, 16> FilenameRefs;
+ FilenameStrs.resize(FileEntries.size());
FilenameRefs.resize(FileEntries.size());
- for (const auto &Entry : FileEntries)
- FilenameRefs[Entry.second] = normalizeFilename(Entry.first->getName());
+ for (const auto &Entry : FileEntries) {
+ auto I = Entry.second;
+ FilenameStrs[I] = normalizeFilename(Entry.first->getName());
+ FilenameRefs[I] = FilenameStrs[I];
+ }
RawCoverageMappingReader Reader(CoverageMapping, FilenameRefs, Filenames,
Expressions, Regions);
if (Reader.read())