llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-codegen Author: None (schittir) <details> <summary>Changes</summary> Use castAs<> instead of getAs<> --- Full diff: https://github.com/llvm/llvm-project/pull/123395.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CGBuiltin.cpp (+4-4) ``````````diff diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 2385f2a320b625..d87528c432a360 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -19297,9 +19297,9 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, assert(T0->isVectorTy() && T1->isVectorTy() && "Dot product of vector and scalar is not supported."); - auto *VecTy0 = E->getArg(0)->getType()->getAs<VectorType>(); + auto *VecTy0 = E->getArg(0)->getType()->castAs<VectorType>(); [[maybe_unused]] auto *VecTy1 = - E->getArg(1)->getType()->getAs<VectorType>(); + E->getArg(1)->getType()->castAs<VectorType>(); assert(VecTy0->getElementType() == VecTy1->getElementType() && "Dot product of vectors need the same element types."); @@ -19392,7 +19392,7 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { llvm::Type *Xty = Op0->getType(); llvm::Type *retType = llvm::Type::getInt1Ty(this->getLLVMContext()); if (Xty->isVectorTy()) { - auto *XVecTy = E->getArg(0)->getType()->getAs<VectorType>(); + auto *XVecTy = E->getArg(0)->getType()->castAs<VectorType>(); retType = llvm::VectorType::get( retType, ElementCount::getFixed(XVecTy->getNumElements())); } @@ -19578,7 +19578,7 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { llvm::Type *Xty = Op0->getType(); llvm::Type *retType = llvm::Type::getInt32Ty(this->getLLVMContext()); if (Xty->isVectorTy()) { - auto *XVecTy = Arg0->getType()->getAs<VectorType>(); + auto *XVecTy = Arg0->getType()->castAs<VectorType>(); retType = llvm::VectorType::get( retType, ElementCount::getFixed(XVecTy->getNumElements())); } `````````` </details> https://github.com/llvm/llvm-project/pull/123395 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits