MC: fix possible NULL pointer dereference

Avoid NULL pointer scenario found via clang's static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203745 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Saleem Abdulrasool
2014-03-13 02:09:51 +00:00
parent 2b5925ba74
commit ce5a6548a2

View File

@@ -2005,7 +2005,7 @@ bool AsmParser::parseMacroArguments(const MCAsmMacro *M,
if (FAI >= NParameters) { if (FAI >= NParameters) {
Error(IDLoc, Error(IDLoc,
"parameter named '" + FA.Name + "' does not exist for macro '" + "parameter named '" + FA.Name + "' does not exist for macro '" +
M->Name + "'"); (M ? M->Name : "<unamed>") + "'");
return true; return true;
} }
PI = FAI; PI = FAI;