From 280ad61e0b40564a838e4fe96bec1fd84b0cd545 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sun, 22 Sep 2019 13:43:12 +0000 Subject: [PATCH] [AArch64] AArch64StackTagging - Silence static analyzer dyn_cast<> null dereference warning. NFCI. The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372507 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64StackTagging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/AArch64/AArch64StackTagging.cpp b/lib/Target/AArch64/AArch64StackTagging.cpp index 4dfe743bafa..5942f61ca74 100644 --- a/lib/Target/AArch64/AArch64StackTagging.cpp +++ b/lib/Target/AArch64/AArch64StackTagging.cpp @@ -471,7 +471,7 @@ void AArch64StackTagging::alignAndPadAlloca(AllocaInfo &Info) { Info.AI->isArrayAllocation() ? ArrayType::get( Info.AI->getAllocatedType(), - dyn_cast(Info.AI->getArraySize())->getZExtValue()) + cast(Info.AI->getArraySize())->getZExtValue()) : Info.AI->getAllocatedType(); Type *PaddingType = ArrayType::get(Type::getInt8Ty(F->getContext()), AlignedSize - Size); -- 2.50.1