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

Hans Wennborg via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 28 06:30:18 PST 2018


Author: hans
Date: Wed Nov 28 06:30:18 2018
New Revision: 347758

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

r347417 was re-committed in Clang.

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=347758&r1=347757&r2=347758&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Nov 28 06:30:18 2018
@@ -5965,10 +5965,10 @@ GetObjCFieldAtIndex(clang::ASTContext *a
 
             if (is_bitfield && ast) {
               clang::Expr *bitfield_bit_size_expr = ivar_pos->getBitWidth();
-              llvm::APSInt bitfield_apsint;
+              clang::Expr::EvalResult result;
               if (bitfield_bit_size_expr &&
-                  bitfield_bit_size_expr->EvaluateAsInt(bitfield_apsint,
-                                                        *ast)) {
+                  bitfield_bit_size_expr->EvaluateAsInt(result, *ast)) {
+                llvm::APSInt bitfield_apsint = result.Val.getInt();
                 *bitfield_bit_size_ptr = bitfield_apsint.getLimitedValue();
               }
             }
@@ -6025,10 +6025,11 @@ CompilerType ClangASTContext::GetFieldAt
 
             if (is_bitfield) {
               clang::Expr *bitfield_bit_size_expr = field->getBitWidth();
-              llvm::APSInt bitfield_apsint;
+              clang::Expr::EvalResult result;
               if (bitfield_bit_size_expr &&
-                  bitfield_bit_size_expr->EvaluateAsInt(bitfield_apsint,
+                  bitfield_bit_size_expr->EvaluateAsInt(result,
                                                         *getASTContext())) {
+                llvm::APSInt bitfield_apsint = result.Val.getInt();
                 *bitfield_bit_size_ptr = bitfield_apsint.getLimitedValue();
               }
             }




More information about the lldb-commits mailing list