[llvm] r368048 - [XCOFF][MC] report_fatal_error before dereferencing NULL
Hubert Tong via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 08:05:20 PDT 2019
Author: hubert.reinterpretcast
Date: Tue Aug 6 08:05:20 2019
New Revision: 368048
URL: http://llvm.org/viewvc/llvm-project?rev=368048&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/MC/MCParser/AsmParser.cpp
Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=368048&r1=368047&r2=368048&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Tue Aug 6 08:05:20 2019
@@ -728,7 +728,8 @@ AsmParser::AsmParser(SourceMgr &SM, MCCo
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;
}
More information about the llvm-commits
mailing list