[Lldb-commits] [lldb] r347391 - Revert 347365, its prerequisite 347364 got reverted.

Nico Weber via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 21 04:50:13 PST 2018


Author: nico
Date: Wed Nov 21 04:50:13 2018
New Revision: 347391

URL: http://llvm.org/viewvc/llvm-project?rev=347391&view=rev
Log:
Revert 347365, its prerequisite 347364 got reverted.

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=347391&r1=347390&r2=347391&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Nov 21 04:50:13 2018
@@ -5963,10 +5963,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();
               }
             }
@@ -6023,11 +6023,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