From: Hubert Tong Date: Tue, 6 Aug 2019 15:05:20 +0000 (+0000) Subject: [XCOFF][MC] report_fatal_error before dereferencing NULL X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a23f5a25c0a12a84a0133c2d9499ff01f52cea5b;p=llvm [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368048 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index a3d6014dc31..27def715ca0 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/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; }