summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJun Zhang <jun@junz.org>2022-07-31 13:03:24 +0800
committerJun Zhang <jun@junz.org>2022-07-31 13:03:24 +0800
commit3da13953834eb31b41949e92886f6fb7f3fd63fc (patch)
treeba2cded53137eb467bfc4fae94374605303af2a3 /clang/lib/CodeGen/CodeGenModule.cpp
parent4b2b68d5abd8981d0a5ca47e2bbc6df3d8360fd1 (diff)
[CodeGen][NFC] Use isa_and_nonnull instead of explicit check
Signed-off-by: Jun Zhang <jun@junz.org>
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 8940cee37d3e..579ebba7736d 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -3974,7 +3974,7 @@ llvm::Constant *CodeGenModule::GetOrCreateLLVMFunction(
// All MSVC dtors other than the base dtor are linkonce_odr and delegate to
// each other bottoming out with the base dtor. Therefore we emit non-base
// dtors on usage, even if there is no dtor definition in the TU.
- if (D && isa<CXXDestructorDecl>(D) &&
+ if (isa_and_nonnull<CXXDestructorDecl>(D) &&
getCXXABI().useThunkForDtorVariant(cast<CXXDestructorDecl>(D),
GD.getDtorType()))
addDeferredDeclToEmit(GD);