Skip to content

Commit

Permalink
[lldb] Adjust for getIntegerConstantExpression refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
JDevlieghere committed Jul 22, 2020
1 parent 9bbf0ec commit e9f5ca0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1657,9 +1657,9 @@ bool TypeSystemClang::FieldIsBitfield(FieldDecl *field,
if (field->isBitField()) {
Expr *bit_width_expr = field->getBitWidth();
if (bit_width_expr) {
llvm::APSInt bit_width_apsint;
if (bit_width_expr->isIntegerConstantExpr(bit_width_apsint, ast)) {
bitfield_bit_size = bit_width_apsint.getLimitedValue(UINT32_MAX);
if (Optional<llvm::APSInt> bit_width_apsint =
bit_width_expr->getIntegerConstantExpr(ast)) {
bitfield_bit_size = bit_width_apsint->getLimitedValue(UINT32_MAX);
return true;
}
}
Expand Down

0 comments on commit e9f5ca0

Please sign in to comment.