aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/HeaderMap.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2023-09-09 18:59:51 -0700
committerJan Svoboda <jan_svoboda@apple.com>2023-09-13 15:02:20 -0700
commitf94695b6eb0e0b2bb059c33903cc7dd4a3ddd47f (patch)
tree7e7d57821fc078d949fd66fca1ecd2d9e1771c11 /clang/lib/Lex/HeaderMap.cpp
parent7e013d6034bd8e81a6434f515f545b4375078512 (diff)
downloadllvm-f94695b6eb0e0b2bb059c33903cc7dd4a3ddd47f.zip
llvm-f94695b6eb0e0b2bb059c33903cc7dd4a3ddd47f.tar.gz
llvm-f94695b6eb0e0b2bb059c33903cc7dd4a3ddd47f.tar.bz2
[clang] NFCI: Use `FileEntryRef` in `FileManager::getBufferForFile()`
Diffstat (limited to 'clang/lib/Lex/HeaderMap.cpp')
-rw-r--r--clang/lib/Lex/HeaderMap.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Lex/HeaderMap.cpp b/clang/lib/Lex/HeaderMap.cpp
index da0b889..2b26426 100644
--- a/clang/lib/Lex/HeaderMap.cpp
+++ b/clang/lib/Lex/HeaderMap.cpp
@@ -48,10 +48,9 @@ static inline unsigned HashHMapKey(StringRef Str) {
/// map. If it doesn't look like a HeaderMap, it gives up and returns null.
/// If it looks like a HeaderMap but is obviously corrupted, it puts a reason
/// into the string error argument and returns null.
-std::unique_ptr<HeaderMap> HeaderMap::Create(const FileEntry *FE,
- FileManager &FM) {
+std::unique_ptr<HeaderMap> HeaderMap::Create(FileEntryRef FE, FileManager &FM) {
// If the file is too small to be a header map, ignore it.
- unsigned FileSize = FE->getSize();
+ unsigned FileSize = FE.getSize();
if (FileSize <= sizeof(HMapHeader)) return nullptr;
auto FileBuffer = FM.getBufferForFile(FE);