diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-09-14 18:29:28 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-09-14 18:29:28 +0000 |
| commit | ad2cbf0e18de093467909b322415f7a2c93f5a12 (patch) | |
| tree | 391cd85fbf395648c87e2f26ef251f9d7dfa99dd /llvm/lib/Target/Sparc | |
| parent | 7f155e10f64b660d9adbf9b6183c80ff9f06e512 (diff) | |
| download | bcm5719-llvm-ad2cbf0e18de093467909b322415f7a2c93f5a12.tar.gz bcm5719-llvm-ad2cbf0e18de093467909b322415f7a2c93f5a12.zip | |
Fix a bug that caused a crash if a setcc had zero uses.
llvm-svn: 574
Diffstat (limited to 'llvm/lib/Target/Sparc')
| -rw-r--r-- | llvm/lib/Target/Sparc/SparcInstrSelection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp index c73264c2210..fde7282e85a 100644 --- a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp +++ b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp @@ -1688,7 +1688,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot, // to follow SSA def-use edges here, not BURG tree edges. // Instruction* result = subtreeRoot->getInstruction(); - Value* firstUse = (Value*) * result->use_begin(); + Value* firstUse = result->use_empty() ? 0 : *result->use_begin(); bool discardResult = (result->use_size() == 1 && firstUse->isInstruction() |

