aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2005-12-22 02:35:21 +0000
committerEvan Cheng <evan.cheng@apple.com>2005-12-22 02:35:21 +0000
commit3a217f3e53a6d3f942583f843df5bade961cdfb1 (patch)
tree87929596ccff700652eb098f45d5cd7db5ddac6f /utils/TableGen
parent5bc4da48933a097924c4b80c9fa1cdb133978a54 (diff)
downloadexternal_llvm-3a217f3e53a6d3f942583f843df5bade961cdfb1.zip
external_llvm-3a217f3e53a6d3f942583f843df5bade961cdfb1.tar.gz
external_llvm-3a217f3e53a6d3f942583f843df5bade961cdfb1.tar.bz2
Attempt to fix a crash on WIN32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index 510f41c..62581ee 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/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.