diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-12-07 16:45:12 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-12-07 16:45:12 +0000 |
commit | ad889a7f8822184e5c3a979dabefce999cd88fda (patch) | |
tree | 501260dbec8c2730cd3aeaec359e13643cadb68d /utils | |
parent | 15b71ba1229415876ca94c2fba7a91f29ca2a2b1 (diff) | |
download | external_llvm-ad889a7f8822184e5c3a979dabefce999cd88fda.zip external_llvm-ad889a7f8822184e5c3a979dabefce999cd88fda.tar.gz external_llvm-ad889a7f8822184e5c3a979dabefce999cd88fda.tar.bz2 |
Better error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/LLVMCConfigurationEmitter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp index fa423f4..eda45c7 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<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) { |