File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
llvm/lib/Transforms/Coroutines Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1653,6 +1653,7 @@ void coro::salvageDebugInfo(
1653
1653
++InsertPt;
1654
1654
Builder.SetInsertPoint (&F->getEntryBlock (), InsertPt);
1655
1655
DIExpression *Expr = DDI->getExpression ();
1656
+ assert (Expr && " null DIExpression" );
1656
1657
// Follow the pointer arithmetic all the way to the incoming
1657
1658
// function argument and convert into a DIExpression.
1658
1659
Value *Storage = DDI->getAddress ();
@@ -1662,6 +1663,9 @@ void coro::salvageDebugInfo(
1662
1663
} else if (auto *GEPInst = dyn_cast<GetElementPtrInst>(Storage)) {
1663
1664
Expr = llvm::salvageDebugInfoImpl (*GEPInst, Expr,
1664
1665
/* WithStackValue=*/ false );
1666
+ // Bail out if the expression couldn't be salvaged.
1667
+ if (!Expr)
1668
+ return ;
1665
1669
Storage = GEPInst->getOperand (0 );
1666
1670
} else if (auto *BCInst = dyn_cast<llvm::BitCastInst>(Storage))
1667
1671
Storage = BCInst->getOperand (0 );
You can’t perform that action at this time.
0 commit comments