aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2008-12-07 16:45:12 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2008-12-07 16:45:12 +0000
commitad889a7f8822184e5c3a979dabefce999cd88fda (patch)
tree501260dbec8c2730cd3aeaec359e13643cadb68d /utils
parent15b71ba1229415876ca94c2fba7a91f29ca2a2b1 (diff)
downloadexternal_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.cpp7
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) {