[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
This commit is contained in:
Hubert Tong 2019-08-06 15:05:20 +00:00
parent c92b951567
commit fc34a536d0
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}