Skip to content

Commit e9f5ca0

Browse files
committed
[lldb] Adjust for getIntegerConstantExpression refactor
1 parent 9bbf0ec commit e9f5ca0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,9 +1657,9 @@ bool TypeSystemClang::FieldIsBitfield(FieldDecl *field,
16571657
if (field->isBitField()) {
16581658
Expr *bit_width_expr = field->getBitWidth();
16591659
if (bit_width_expr) {
1660-
llvm::APSInt bit_width_apsint;
1661-
if (bit_width_expr->isIntegerConstantExpr(bit_width_apsint, ast)) {
1662-
bitfield_bit_size = bit_width_apsint.getLimitedValue(UINT32_MAX);
1660+
if (Optional<llvm::APSInt> bit_width_apsint =
1661+
bit_width_expr->getIntegerConstantExpr(ast)) {
1662+
bitfield_bit_size = bit_width_apsint->getLimitedValue(UINT32_MAX);
16631663
return true;
16641664
}
16651665
}

0 commit comments

Comments
 (0)