aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/FileManager.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-12-11 21:13:13 -0800
committerGitHub <noreply@github.com>2024-12-11 21:13:13 -0800
commit02dd73a5d585af9a950baa38855305fdb17c76af (patch)
treebe0b068454fa4a084537d0278cb72250d9c79e25 /clang/lib/Basic/FileManager.cpp
parent48ed91871dccf12dbe27e96b457ccee373c68a1e (diff)
downloadllvm-02dd73a5d585af9a950baa38855305fdb17c76af.zip
llvm-02dd73a5d585af9a950baa38855305fdb17c76af.tar.gz
llvm-02dd73a5d585af9a950baa38855305fdb17c76af.tar.bz2
[clang] Migrate away from PointerUnion::{is,get} (NFC) (#119654)
Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with // isa<T>, cast<T> and the llvm::dyn_cast<T> I'm not touching PointerUnion::dyn_cast for now because it's a bit complicated; we could blindly migrate it to dyn_cast_if_present, but we should probably use dyn_cast when the operand is known to be non-null.
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r--clang/lib/Basic/FileManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp
index 2876c29..f44b5e4 100644
--- a/clang/lib/Basic/FileManager.cpp
+++ b/clang/lib/Basic/FileManager.cpp
@@ -398,7 +398,7 @@ FileEntryRef FileManager::getVirtualFileRef(StringRef Filename, off_t Size,
{Filename, std::errc::no_such_file_or_directory}).first;
if (NamedFileEnt.second) {
FileEntryRef::MapValue Value = *NamedFileEnt.second;
- if (LLVM_LIKELY(Value.V.is<FileEntry *>()))
+ if (LLVM_LIKELY(isa<FileEntry *>(Value.V)))
return FileEntryRef(NamedFileEnt);
return FileEntryRef(*Value.V.get<const FileEntryRef::MapEntry *>());
}