mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Don't bind a reference to a dereferenced null pointer (for return value of WeakVH::operator*).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162309 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4fdadef51
commit
875cc5d629
@ -738,7 +738,8 @@ DeleteTriviallyDeadInstructions(SmallVectorImpl<WeakVH> &DeadInsts) {
|
||||
bool Changed = false;
|
||||
|
||||
while (!DeadInsts.empty()) {
|
||||
Instruction *I = dyn_cast_or_null<Instruction>(&*DeadInsts.pop_back_val());
|
||||
Value *V = DeadInsts.pop_back_val();
|
||||
Instruction *I = dyn_cast_or_null<Instruction>(V);
|
||||
|
||||
if (I == 0 || !isInstructionTriviallyDead(I))
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user