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 | 4cc945da6e1439228ebdbbc5df93f003501e2b45 (patch) | |
tree | 80041a6487792ff75ee1c5380cf8bfa74512fd75 /llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp | |
parent | 395cb25ac7f6c25b1b02f0483be3b377354c1e7e (diff) | |
download | bcm5719-llvm-4cc945da6e1439228ebdbbc5df93f003501e2b45.tar.gz bcm5719-llvm-4cc945da6e1439228ebdbbc5df93f003501e2b45.zip |
Better error message.
llvm-svn: 60664
Diffstat (limited to 'llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp | 7 |
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) { |