Skip to content

Commit f1c08ee

Browse files
committed
[clang] NFCI: Use FileEntryRef::getName() in clangIndexSerialization
The clangIndexSerialization target seems to be unused, so it didn't build when I ran `check-all` before landing d1f86c3. This should resolve the deprecation warning that caused some build bots to fail.
1 parent 2f62037 commit f1c08ee

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang/include/clang/IndexSerialization/SerializablePathCollection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class SerializablePathCollection {
110110

111111
/// Stores path to \p FE if it hasn't been stored yet.
112112
/// \returns index to array exposed by getPathsBuffer().
113-
size_t tryStoreFilePath(const clang::FileEntry &FE);
113+
size_t tryStoreFilePath(FileEntryRef FE);
114114

115115
private:
116116
/// Stores \p Path if it is non-empty.

clang/lib/IndexSerialization/SerializablePathCollection.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ SerializablePathCollection::SerializablePathCollection(
4545
SysRootPath(Paths.addDirPath(SysRoot)),
4646
OutputFilePath(Paths.addDirPath(OutputFile)) {}
4747

48-
size_t SerializablePathCollection::tryStoreFilePath(const FileEntry &FE) {
49-
auto FileIt = UniqueFiles.find(&FE);
48+
size_t SerializablePathCollection::tryStoreFilePath(FileEntryRef FE) {
49+
auto FileIt = UniqueFiles.find(FE);
5050
if (FileIt != UniqueFiles.end())
5151
return FileIt->second;
5252

5353
const auto Dir = tryStoreDirPath(sys::path::parent_path(FE.getName()));
5454
const auto FileIdx =
5555
Paths.addFilePath(Dir.Root, Dir.Path, sys::path::filename(FE.getName()));
5656

57-
UniqueFiles.try_emplace(&FE, FileIdx);
57+
UniqueFiles.try_emplace(FE, FileIdx);
5858
return FileIdx;
5959
}
6060

0 commit comments

Comments
 (0)