[Lldb-commits] [lldb] r347673 - Catch up with EvaluateAsInt() clang API change.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 27 08:40:21 PST 2018


Author: davide
Date: Tue Nov 27 08:40:21 2018
New Revision: 347673

URL: http://llvm.org/viewvc/llvm-project?rev=347673&view=rev
Log:
Catch up with EvaluateAsInt() clang API change.

Modified:
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=347673&r1=347672&r2=347673&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Tue Nov 27 08:40:21 2018
@@ -5965,10 +5965,10 @@ GetObjCFieldAtIndex(clang::ASTContext *a
 
             if (is_bitfield && ast) {
               clang::Expr *bitfield_bit_size_expr = ivar_pos->getBitWidth();
-              clang::Expr::EvalResult result;
+              llvm::APSInt bitfield_apsint;
               if (bitfield_bit_size_expr &&
-                  bitfield_bit_size_expr->EvaluateAsInt(result, *ast)) {
-                llvm::APSInt bitfield_apsint = result.Val.getInt();
+                  bitfield_bit_size_expr->EvaluateAsInt(bitfield_apsint,
+                                                        *ast)) {
                 *bitfield_bit_size_ptr = bitfield_apsint.getLimitedValue();
               }
             }
@@ -6025,11 +6025,10 @@ CompilerType ClangASTContext::GetFieldAt
 
             if (is_bitfield) {
               clang::Expr *bitfield_bit_size_expr = field->getBitWidth();
-              clang::Expr::EvalResult result;
+              llvm::APSInt bitfield_apsint;
               if (bitfield_bit_size_expr &&
-                  bitfield_bit_size_expr->EvaluateAsInt(result,
+                  bitfield_bit_size_expr->EvaluateAsInt(bitfield_apsint,
                                                         *getASTContext())) {
-                llvm::APSInt bitfield_apsint = result.Val.getInt();
                 *bitfield_bit_size_ptr = bitfield_apsint.getLimitedValue();
               }
             }




More information about the lldb-commits mailing list