diff options
author | Nate Begeman <natebegeman@mac.com> | 2007-05-01 06:08:36 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2007-05-01 06:08:36 +0000 |
commit | 6f7c8ffd9a92bdd625c5bc316187a49c0b1d41d6 (patch) | |
tree | 30d023db006287e98d6f55f5a25b75307216ac82 | |
parent | 7bf1c272ab27297a7bbab329de3f17ddb26e02a3 (diff) | |
download | external_llvm-6f7c8ffd9a92bdd625c5bc316187a49c0b1d41d6.zip external_llvm-6f7c8ffd9a92bdd625c5bc316187a49c0b1d41d6.tar.gz external_llvm-6f7c8ffd9a92bdd625c5bc316187a49c0b1d41d6.tar.bz2 |
A bit of feedback from Chris that I missed; error rather than asserting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36619 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | utils/TableGen/RegisterInfoEmitter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/TableGen/RegisterInfoEmitter.cpp b/utils/TableGen/RegisterInfoEmitter.cpp index 61d731a..0e3645b 100644 --- a/utils/TableGen/RegisterInfoEmitter.cpp +++ b/utils/TableGen/RegisterInfoEmitter.cpp @@ -450,8 +450,11 @@ void RegisterInfoEmitter::run(std::ostream &OS) { std::vector<Record*> From = SubRegs[i]->getValueAsListOfDefs("From"); std::vector<Record*> To = SubRegs[i]->getValueAsListOfDefs("To"); - assert((From.size() == To.size()) && - "SubRegSet has mismatched from/to size"); + if (From.size() != To.size()) { + cerr << "Error: register list and sub-register list not of equal length" + << " in SubRegSet\n"; + exit(1); + } // For each entry in from/to vectors, insert the to register at index for (unsigned ii = 0, ee = From.size(); ii != ee; ++ii) |