From 889f6606ed54878bfcbcc6431d7eae59b05923bf Mon Sep 17 00:00:00 2001 From: Christopher Tetreault Date: Fri, 10 Apr 2020 14:23:20 -0700 Subject: Clean up usages of asserting vector getters in Type Summary: Remove usages of asserting vector getters in Type in preparation for the VectorType refactor. The existence of these functions complicates the refactor while adding little value. Reviewers: stoklund, sdesmalen, efriedma Reviewed By: sdesmalen Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77272 --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp') diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index cc54b41171d4..b96cba456e7c 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -1681,8 +1681,8 @@ static std::string scalarConstantToHexString(const Constant *C) { return APIntToHexString(CI->getValue()); } else { unsigned NumElements; - if (isa(Ty)) - NumElements = Ty->getVectorNumElements(); + if (auto *VTy = dyn_cast(Ty)) + NumElements = VTy->getNumElements(); else NumElements = Ty->getArrayNumElements(); std::string HexString; -- cgit v1.2.3