From fc34a536d04a6941c0783098e71f10b1f616120d Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Tue, 6 Aug 2019 15:05:20 +0000 Subject: [PATCH] [XCOFF][MC] report_fatal_error before dereferencing NULL This patch replaces a TODO comment with a call to `report_fatal_error`. The path that reaches the added call to `report_fatal_error` manifestly dereferences a null pointer. llvm-svn: 368048 --- llvm/lib/MC/MCParser/AsmParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index a3d6014dc31f..27def715ca04 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -728,7 +728,8 @@ AsmParser::AsmParser(SourceMgr &SM, MCContext &Ctx, MCStreamer &Out, PlatformParser.reset(createWasmAsmParser()); break; case MCObjectFileInfo::IsXCOFF: - // TODO: Need to implement createXCOFFAsmParser for XCOFF format. + report_fatal_error( + "Need to implement createXCOFFAsmParser for XCOFF format."); break; }