MC: change runtime check to an assertion

It is unclear how it would be possible to get M to be NULL in normal scenarios.
Change this to an assert rather than a runtime check as per dblakie's
suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Saleem Abdulrasool 2014-03-17 17:13:57 +00:00
parent 5b5e5abd20
commit 1e4d7d7ef7

View File

@ -1998,9 +1998,10 @@ bool AsmParser::parseMacroArguments(const MCAsmMacro *M,
break;
if (FAI >= NParameters) {
assert(M && "expected macro to be defined");
Error(IDLoc,
"parameter named '" + FA.Name + "' does not exist for macro '" +
(M ? M->Name : "<unnamed>") + "'");
M->Name + "'");
return true;
}
PI = FAI;