diff options
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r-- | clang/lib/Basic/FileManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index f44b5e4..f0b6f7b 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/lib/Basic/FileManager.cpp @@ -324,9 +324,9 @@ llvm::Expected<FileEntryRef> FileManager::getFileRef(StringRef Filename, *SeenFileEntries .insert({Status.getName(), FileEntryRef::MapValue(*UFE, DirInfo)}) .first; - assert(Redirection.second->V.is<FileEntry *>() && + assert(isa<FileEntry *>(Redirection.second->V) && "filename redirected to a non-canonical filename?"); - assert(Redirection.second->V.get<FileEntry *>() == UFE && + assert(cast<FileEntry *>(Redirection.second->V) == UFE && "filename from getStatValue() refers to wrong file"); // Cache the redirection in the previously-inserted entry, still available @@ -400,7 +400,7 @@ FileEntryRef FileManager::getVirtualFileRef(StringRef Filename, off_t Size, FileEntryRef::MapValue Value = *NamedFileEnt.second; if (LLVM_LIKELY(isa<FileEntry *>(Value.V))) return FileEntryRef(NamedFileEnt); - return FileEntryRef(*Value.V.get<const FileEntryRef::MapEntry *>()); + return FileEntryRef(*cast<const FileEntryRef::MapEntry *>(Value.V)); } // We've not seen this before, or the file is cached as non-existent. @@ -620,7 +620,7 @@ void FileManager::GetUniqueIDMapping( for (const auto &Entry : SeenFileEntries) { // Only return files that exist and are not redirected. - if (!Entry.getValue() || !Entry.getValue()->V.is<FileEntry *>()) + if (!Entry.getValue() || !isa<FileEntry *>(Entry.getValue()->V)) continue; FileEntryRef FE(Entry); // Add this file if it's the first one with the UID, or if its name is |