forked from OSchip/llvm-project
[lldb] Adjust for getIntegerConstantExpression refactor
This commit is contained in:
parent
9bbf0ecff3
commit
e9f5ca0b79
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue