[opt] Fix static code analysis concerns
authorArvind Sudarsanam <arvind.sudarsanam@intel.com>
Thu, 19 Jan 2023 18:24:46 +0000 (10:24 -0800)
committerArthur Eubanks <aeubanks@google.com>
Thu, 19 Jan 2023 19:35:15 +0000 (11:35 -0800)
commit176a0827de42f123436c8ab850ef009f9339b7b6
tree2ca50957efe4ab5efc32fc0e2efb30b5e0f6115e
parent1d67f2cd7850a9a6c6ac4d31959163e1c412c687
[opt] Fix static code analysis concerns

This is an issue reported inside the NewPMDriver module. Static analyzer reported that Null pointer 'P' may be dereferenced at line 371 and two more sites. Proposed change guards this use.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D142047
llvm/tools/opt/NewPMDriver.cpp