aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorXinWang10 <108658776+XinWang10@users.noreply.github.com>2023-09-08 10:10:09 +0800
committerGitHub <noreply@github.com>2023-09-08 10:10:09 +0800
commit99fb65fa7a65b9a3f961d6ef715324c2f8637766 (patch)
tree2e0f360c7577ac097a8e2d90e0efd5fa0f39bae7 /flang/lib/Frontend/CompilerInvocation.cpp
parent23f144ec1c014fb26a98cff407d2d83b50f11baf (diff)
downloadllvm-99fb65fa7a65b9a3f961d6ef715324c2f8637766.zip
llvm-99fb65fa7a65b9a3f961d6ef715324c2f8637766.tar.gz
llvm-99fb65fa7a65b9a3f961d6ef715324c2f8637766.tar.bz2
[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.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions