[llvm] Revert "[NFC]Add assert to avoid possibly deref nullptr (#65564)" (PR #66187)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 11:25:28 PDT 2023


================
@@ -400,7 +400,6 @@ void AsmPrinter::emitInlineAsm(const MachineInstr *MI) const {
         "Reserved registers on the clobber list may not be "
         "preserved across the asm statement, and clobbering them may "
         "lead to undefined behaviour.";
-    assert(MMI && "MMI can not be nullptr!");
----------------
MaskRay wrote:

Note also that we MMI dereference expresses non-nullness intention, so the assert is not needed.

https://github.com/llvm/llvm-project/pull/66187


More information about the llvm-commits mailing list