diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2005-12-22 02:35:21 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2005-12-22 02:35:21 +0000 |
| commit | a87d7439123aca49302245b5fec270727c624f1f (patch) | |
| tree | 61ef92fbdae3d955eb43cc8ce55f16ca880fca2b /llvm/utils | |
| parent | dfad8ed54e59fd6c5bd688150ed29d15938a16ae (diff) | |
| download | bcm5719-llvm-a87d7439123aca49302245b5fec270727c624f1f.tar.gz bcm5719-llvm-a87d7439123aca49302245b5fec270727c624f1f.zip | |
Attempt to fix a crash on WIN32.
llvm-svn: 24936
Diffstat (limited to 'llvm/utils')
| -rw-r--r-- | llvm/utils/TableGen/DAGISelEmitter.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp index 510f41cfd9b..62581eea1d1 100644 --- a/llvm/utils/TableGen/DAGISelEmitter.cpp +++ b/llvm/utils/TableGen/DAGISelEmitter.cpp @@ -1124,22 +1124,23 @@ void DAGISelEmitter::ParseInstructions() { CodeGenInstruction &InstInfo =Target.getInstruction(Instrs[i]->getName()); - // Note: Removed if (InstInfo.OperandList.size() == 0) continue; - // It's possible for some instruction, e.g. RET for X86 that only has an - // implicit flag operand. - // FIXME: temporary hack... - if (InstInfo.isReturn || InstInfo.isBranch || InstInfo.isCall || - InstInfo.isStore) { - // These produce no results - for (unsigned j = 0, e = InstInfo.OperandList.size(); j < e; ++j) - Operands.push_back(InstInfo.OperandList[j].Rec); - } else { - // Assume the first operand is the result. - Results.push_back(InstInfo.OperandList[0].Rec); + if (InstInfo.OperandList.size() != 0) { + // It's possible for some instruction, e.g. RET for X86 that only has an + // implicit flag operand. + // FIXME: temporary hack... + if (InstInfo.isReturn || InstInfo.isBranch || InstInfo.isCall || + InstInfo.isStore) { + // These produce no results + for (unsigned j = 0, e = InstInfo.OperandList.size(); j < e; ++j) + Operands.push_back(InstInfo.OperandList[j].Rec); + } else { + // Assume the first operand is the result. + Results.push_back(InstInfo.OperandList[0].Rec); - // The rest are inputs. - for (unsigned j = 1, e = InstInfo.OperandList.size(); j < e; ++j) - Operands.push_back(InstInfo.OperandList[j].Rec); + // The rest are inputs. + for (unsigned j = 1, e = InstInfo.OperandList.size(); j < e; ++j) + Operands.push_back(InstInfo.OperandList[j].Rec); + } } // Create and insert the instruction. |

