[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.
Loading
Please sign in to comment