@@ -322,12 +322,12 @@ class CoverageMappingBuilder {
322
322
for (const auto &FL : FileLocs) {
323
323
SourceLocation Loc = FL.first ;
324
324
FileID SpellingFile = SM.getDecomposedSpellingLoc (Loc).first ;
325
- auto Entry = SM.getFileEntryForID (SpellingFile);
325
+ auto Entry = SM.getFileEntryRefForID (SpellingFile);
326
326
if (!Entry)
327
327
continue ;
328
328
329
329
FileIDMapping[SM.getFileID (Loc)] = std::make_pair (Mapping.size (), Loc);
330
- Mapping.push_back (CVM.getFileID (Entry));
330
+ Mapping.push_back (CVM.getFileID (* Entry));
331
331
}
332
332
}
333
333
@@ -1740,7 +1740,7 @@ void CoverageMappingModuleGen::addFunctionMappingRecord(
1740
1740
FilenameStrs[0 ] = normalizeFilename (getCurrentDirname ());
1741
1741
for (const auto &Entry : FileEntries) {
1742
1742
auto I = Entry.second ;
1743
- FilenameStrs[I] = normalizeFilename (Entry.first -> getName ());
1743
+ FilenameStrs[I] = normalizeFilename (Entry.first . getName ());
1744
1744
}
1745
1745
ArrayRef<std::string> FilenameRefs = llvm::ArrayRef (FilenameStrs);
1746
1746
RawCoverageMappingReader Reader (CoverageMapping, FilenameRefs, Filenames,
@@ -1764,7 +1764,7 @@ void CoverageMappingModuleGen::emit() {
1764
1764
FilenameStrs[0 ] = normalizeFilename (getCurrentDirname ());
1765
1765
for (const auto &Entry : FileEntries) {
1766
1766
auto I = Entry.second ;
1767
- FilenameStrs[I] = normalizeFilename (Entry.first -> getName ());
1767
+ FilenameStrs[I] = normalizeFilename (Entry.first . getName ());
1768
1768
}
1769
1769
1770
1770
std::string Filenames;
@@ -1823,7 +1823,7 @@ void CoverageMappingModuleGen::emit() {
1823
1823
}
1824
1824
}
1825
1825
1826
- unsigned CoverageMappingModuleGen::getFileID (const FileEntry * File) {
1826
+ unsigned CoverageMappingModuleGen::getFileID (FileEntryRef File) {
1827
1827
auto It = FileEntries.find (File);
1828
1828
if (It != FileEntries.end ())
1829
1829
return It->second ;
0 commit comments