From 3da13953834eb31b41949e92886f6fb7f3fd63fc Mon Sep 17 00:00:00 2001 From: Jun Zhang Date: Sun, 31 Jul 2022 13:03:24 +0800 Subject: [CodeGen][NFC] Use isa_and_nonnull instead of explicit check Signed-off-by: Jun Zhang --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') 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(D) && + if (isa_and_nonnull(D) && getCXXABI().useThunkForDtorVariant(cast(D), GD.getDtorType())) addDeferredDeclToEmit(GD); -- cgit v1.2.3