Skip to content

Commit e11e65f

Browse files
[CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (llvm#125336)
Note that PointerUnion::dyn_cast has 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> Literal migration would result in dyn_cast_if_present (see the definition of PointerUnion::dyn_cast), but this patch uses dyn_cast because we expect E to be nonnull.
1 parent 657dc6d commit e11e65f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/CodeGen/MicrosoftCXXABI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,8 +1996,8 @@ CGCallee MicrosoftCXXABI::getVirtualFunctionPointer(CodeGenFunction &CGF,
19961996
llvm::Value *MicrosoftCXXABI::EmitVirtualDestructorCall(
19971997
CodeGenFunction &CGF, const CXXDestructorDecl *Dtor, CXXDtorType DtorType,
19981998
Address This, DeleteOrMemberCallExpr E, llvm::CallBase **CallOrInvoke) {
1999-
auto *CE = E.dyn_cast<const CXXMemberCallExpr *>();
2000-
auto *D = E.dyn_cast<const CXXDeleteExpr *>();
1999+
auto *CE = dyn_cast<const CXXMemberCallExpr *>(E);
2000+
auto *D = dyn_cast<const CXXDeleteExpr *>(E);
20012001
assert((CE != nullptr) ^ (D != nullptr));
20022002
assert(CE == nullptr || CE->arg_begin() == CE->arg_end());
20032003
assert(DtorType == Dtor_Deleting || DtorType == Dtor_Complete);

0 commit comments

Comments
 (0)