Skip to content

Commit 8ebe1d1

Browse files
authored
Revert "[NFC]Add assert to avoid possibly deref nullptr (#65564)" (#66187)
This reverts commit 99fb65f because it won't benefit.
1 parent adae4e9 commit 8ebe1d1

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,6 @@ void AsmPrinter::emitInlineAsm(const MachineInstr *MI) const {
400400
"Reserved registers on the clobber list may not be "
401401
"preserved across the asm statement, and clobbering them may "
402402
"lead to undefined behaviour.";
403-
assert(MMI && "MMI can not be nullptr!");
404403
MMI->getModule()->getContext().diagnose(DiagnosticInfoInlineAsm(
405404
LocCookie, Msg, DiagnosticSeverity::DS_Warning));
406405
MMI->getModule()->getContext().diagnose(

llvm/lib/Target/X86/X86AsmPrinter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,6 @@ void X86AsmPrinter::emitStartOfAsmFile(Module &M) {
769769
if (!TT.isArch32Bit() && !TT.isArch64Bit())
770770
llvm_unreachable("CFProtection used on invalid architecture!");
771771
MCSection *Cur = OutStreamer->getCurrentSectionOnly();
772-
assert(MMI && "MMI can not be nullptr!");
773772
MCSection *Nt = MMI->getContext().getELFSection(
774773
".note.gnu.property", ELF::SHT_NOTE, ELF::SHF_ALLOC);
775774
OutStreamer->switchSection(Nt);

0 commit comments

Comments
 (0)