From 5ee387690568979fbb8c973eeb61e1a66ee6cc61 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 11 Jun 2022 11:15:52 -0700 Subject: [PATCH] Use isa instead of dyn_cast (NFC) --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- clang/lib/Sema/SemaOpenMP.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 21f7219..23b0df2 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3664,7 +3664,7 @@ void CodeGenModule::emitCPUDispatchDefinition(GlobalDecl GD) { // Fix up function declarations that were created for cpu_specific before // cpu_dispatch was known - if (!dyn_cast(IFunc)) { + if (!isa(IFunc)) { assert(cast(IFunc)->isDeclaration()); auto *GI = llvm::GlobalIFunc::create(DeclTy, 0, Linkage, "", ResolverFunc, &getModule()); diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 803e013..0615c81 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -11966,8 +11966,8 @@ bool OpenMPAtomicCompareCaptureChecker::checkStmt(Stmt *S, UpdateStmt = S1; CondUpdateStmt = S2; // Check if form 45. - if (dyn_cast(BO->getRHS()->IgnoreImpCasts()) && - dyn_cast(S2)) + if (isa(BO->getRHS()->IgnoreImpCasts()) && + isa(S2)) return checkForm45(CS, ErrorInfo); // It cannot be set before we the check for form45. IsPostfixUpdate = true; -- 2.7.4