Skip to content

Commit dc50c93

Browse files
committed
Handle missing DIExprOperator kinds in IRGenDebugInfo
1 parent 3586389 commit dc50c93

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,8 +2421,22 @@ bool IRGenDebugInfoImpl::buildDebugInfoExpression(
24212421
case SILDIExprOperator::Dereference:
24222422
Operands.push_back(llvm::dwarf::DW_OP_deref);
24232423
break;
2424-
default:
2425-
llvm_unreachable("Unrecognized operator");
2424+
case SILDIExprOperator::Plus:
2425+
Operands.push_back(llvm::dwarf::DW_OP_plus);
2426+
break;
2427+
case SILDIExprOperator::Minus:
2428+
Operands.push_back(llvm::dwarf::DW_OP_minus);
2429+
break;
2430+
case SILDIExprOperator::ConstUInt:
2431+
Operands.push_back(llvm::dwarf::DW_OP_constu);
2432+
Operands.push_back(*ExprOperand[1].getAsConstInt());
2433+
break;
2434+
case SILDIExprOperator::ConstSInt:
2435+
Operands.push_back(llvm::dwarf::DW_OP_consts);
2436+
Operands.push_back(*ExprOperand[1].getAsConstInt());
2437+
break;
2438+
case SILDIExprOperator::INVALID:
2439+
return false;
24262440
}
24272441
}
24282442
return true;

0 commit comments

Comments
 (0)