mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Fix a bug that caused a crash if a setcc had zero uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@574 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c0c77083ba
commit
ffe335ace1
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user