From: Mikhail Glushenkov Date: Sun, 7 Dec 2008 16:45:12 +0000 (+0000) Subject: Better error message. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ad889a7f8822184e5c3a979dabefce999cd88fda;p=oota-llvm.git Better error message. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60664 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp index fa423f4ec85..eda45c7a7b7 100644 --- a/utils/TableGen/LLVMCConfigurationEmitter.cpp +++ b/utils/TableGen/LLVMCConfigurationEmitter.cpp @@ -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(Case)->getOperator()->getAsString() != "case") + throw + std::string("The argument to (actions) should be a 'case' construct!"); + toolDesc_.Actions = Case; } void onCmdLine (const DagInit* d) {