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
commit8d489a8449c375ffd81bec46cf6a127dec8ad54e (patch)
tree501260dbec8c2730cd3aeaec359e13643cadb68d /utils
parent02ec3a589aabee92d3fd03646c601fefcc4d53f3 (diff)
downloadexternal_llvm-8d489a8449c375ffd81bec46cf6a127dec8ad54e.zip
external_llvm-8d489a8449c375ffd81bec46cf6a127dec8ad54e.tar.gz
external_llvm-8d489a8449c375ffd81bec46cf6a127dec8ad54e.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) {