InstrProf - avoid static analyzer dyn_cast<ConstantInt> null dereference warning.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 1 Oct 2019 10:38:30 +0000 (10:38 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 1 Oct 2019 10:38:30 +0000 (10:38 +0000)
commit339b1b5bb0f9aabed696cfbc42752e8ad3053302
treec7404209d327d13da08357c96c1aef5b8e30895b
parentd71315f2ae8a14ca4b55f316ab00faf56c4f6208
InstrProf - avoid static analyzer dyn_cast<ConstantInt> null dereference warning.

The static analyzer is warning about a potential null dereference, as we're already earlying-out for a null Constant pointer I've just folded this into a dyn_cast_or_null<ConstantInt>.

No test case, this is by inspection only.

llvm-svn: 373322
llvm/lib/ProfileData/InstrProf.cpp