Skip to content

Commit 47876da

Browse files
committed
Update Local.cpp
1 parent df345c0 commit 47876da

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/lib/Transforms/Utils/Local.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,13 @@ simplifyAndDCEInstruction(Instruction *I,
667667
SmallSetVector<Instruction *, 16> &WorkList,
668668
const DataLayout &DL,
669669
const TargetLibraryInfo *TLI) {
670+
if (!I)
671+
return false;
672+
if (!I->getParent())
673+
return false;
674+
if (!I->getFunction())
675+
return false;
676+
670677
if (isInstructionTriviallyDead(I, TLI)) {
671678
salvageDebugInfo(*I);
672679

0 commit comments

Comments
 (0)