mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-12 04:26:43 +00:00
Don't bind a reference to a dereferenced null pointer (for return value of WeakVH::operator*).
llvm-svn: 162309
This commit is contained in:
parent
92debd58d9
commit
a2d387ae5e
@ -738,7 +738,8 @@ DeleteTriviallyDeadInstructions(SmallVectorImpl<WeakVH> &DeadInsts) {
|
|||||||
bool Changed = false;
|
bool Changed = false;
|
||||||
|
|
||||||
while (!DeadInsts.empty()) {
|
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))
|
if (I == 0 || !isInstructionTriviallyDead(I))
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user