Better error message.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60664 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mikhail Glushenkov 2008-12-07 16:45:12 +00:00
parent 15b71ba122
commit ad889a7f88

View File

@ -584,7 +584,12 @@ private:
void onActions (const DagInit* d) {
checkNumberOfArguments(d, 1);
toolDesc_.Actions = d->getArg(0);
Init* Case = d->getArg(0);
if (typeid(*Case) != typeid(DagInit) ||
static_cast<DagInit*>(Case)->getOperator()->getAsString() != "case")
throw
std::string("The argument to (actions) should be a 'case' construct!");
toolDesc_.Actions = Case;
}
void onCmdLine (const DagInit* d) {