From e9f5ca0b7977bb3886feae0d35617a0ea9349a2a Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 21 Jul 2020 23:04:20 -0700 Subject: [PATCH] [lldb] Adjust for getIntegerConstantExpression refactor --- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp index 8825b47..af11668 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -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 bit_width_apsint = + bit_width_expr->getIntegerConstantExpr(ast)) { + bitfield_bit_size = bit_width_apsint->getLimitedValue(UINT32_MAX); return true; } } -- 2.7.4