Skip to content

Commit c209d56

Browse files
committed
[RemoveDIs] Fold variable into assert, it's only used once. NFC
1 parent 3d42557 commit c209d56

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Utils/Local.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,9 +2135,8 @@ bool llvm::replaceDbgDeclare(Value *Address, Value *NewAddress,
21352135
findDbgDeclares(DbgDeclares, Address, &DPValues);
21362136

21372137
auto ReplaceOne = [&](auto *DII) {
2138-
auto *DIVar = DII->getVariable();
2138+
assert(DII->getVariable() && "Missing variable");
21392139
auto *DIExpr = DII->getExpression();
2140-
assert(DIVar && "Missing variable");
21412140
DIExpr = DIExpression::prepend(DIExpr, DIExprFlags, Offset);
21422141
DII->setExpression(DIExpr);
21432142
DII->replaceVariableLocationOp(Address, NewAddress);

0 commit comments

Comments
 (0)