summaryrefslogtreecommitdiffstats
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
commit4cc945da6e1439228ebdbbc5df93f003501e2b45 (patch)
tree80041a6487792ff75ee1c5380cf8bfa74512fd75
parent395cb25ac7f6c25b1b02f0483be3b377354c1e7e (diff)
downloadbcm5719-llvm-4cc945da6e1439228ebdbbc5df93f003501e2b45.tar.gz
bcm5719-llvm-4cc945da6e1439228ebdbbc5df93f003501e2b45.zip
Better error message.
llvm-svn: 60664
-rw-r--r--llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp b/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp
index fa423f4ec85..eda45c7a7b7 100644
--- a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud