Skip to content
Unverified Commit 99fb65fa authored by XinWang10's avatar XinWang10 Committed by GitHub
Browse files

[NFC]Add assert to avoid possibly deref nullptr (#65564)

These 2 functions could be called by AsmPrinter::doInitialization in
AsmPrinter.cpp. doInitialization init MMI in the beginning`MMI = MMIWP ?
&MMIWP->getMMI() : nullptr;`, MMI has the possibility to be nullptr,
which could make the later deref crash. I think in most time MMI could
not be nullptr, but from the view of function implementation, it could
be, so I'd like to add assert to it, if this could be a problem, then we
could avoid crash.
parent 23f144ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment