mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-10 05:41:40 +00:00
[LegacyPassManager] Fixed "null check after derefencing" warning
The 'RequiredPass' pointer was utilized before it was verified against nullptr. Check lines: 1626, 1629.
This commit is contained in:
parent
a1ea2306ad
commit
10e761fa76
@ -1626,13 +1626,12 @@ MPPassManager::runOnModule(Module &M) {
|
||||
/// RequiredPass is run on the fly by Pass Manager when P requests it
|
||||
/// through getAnalysis interface.
|
||||
void MPPassManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) {
|
||||
assert(RequiredPass && "No required pass?");
|
||||
assert(P->getPotentialPassManagerType() == PMT_ModulePassManager &&
|
||||
"Unable to handle Pass that requires lower level Analysis pass");
|
||||
assert((P->getPotentialPassManagerType() <
|
||||
RequiredPass->getPotentialPassManagerType()) &&
|
||||
"Unable to handle Pass that requires lower level Analysis pass");
|
||||
if (!RequiredPass)
|
||||
return;
|
||||
|
||||
FunctionPassManagerImpl *FPP = OnTheFlyManagers[P];
|
||||
if (!FPP) {
|
||||
|
Loading…
Reference in New Issue
Block a user