forked from OSchip/llvm-project
Use cast<> instead of dyn_cast<> as we dereference the pointer immediately. NFCI.
Fix clang static analyzer warning - we know that the arg should be ConstantInt and we're better off relying on cast<> asserting on failure rather than a null dereference crash.
This commit is contained in:
parent
5bf45ee156
commit
0ff1ab42f2
|
@ -658,7 +658,7 @@ bool AArch64StackTagging::runOnFunction(Function &Fn) {
|
|||
IntrinsicInst *Start = Info.LifetimeStart[0];
|
||||
IntrinsicInst *End = Info.LifetimeEnd[0];
|
||||
uint64_t Size =
|
||||
dyn_cast<ConstantInt>(Start->getArgOperand(0))->getZExtValue();
|
||||
cast<ConstantInt>(Start->getArgOperand(0))->getZExtValue();
|
||||
Size = alignTo(Size, kTagGranuleSize);
|
||||
tagAlloca(AI, Start->getNextNode(), Start->getArgOperand(1), Size);
|
||||
// We need to ensure that if we tag some object, we certainly untag it
|
||||
|
|
Loading…
Reference in New Issue