[Lldb-commits] [lldb] r184390 - Fixed a crasher that I encountered when looking up a virtual base class offset.

Greg Clayton gclayton at apple.com
Wed Jun 19 18:24:53 PDT 2013


Author: gclayton
Date: Wed Jun 19 20:24:52 2013
New Revision: 184390

URL: http://llvm.org/viewvc/llvm-project?rev=184390&view=rev
Log:
Fixed a crasher that I encountered when looking up a virtual base class offset.


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=184390&r1=184389&r2=184390&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Jun 19 20:24:52 2013
@@ -3582,9 +3582,9 @@ ClangASTContext::GetDirectBaseClassAtInd
                             {
                                 const ASTRecordLayout &record_layout = ast->getASTRecordLayout(cxx_record_decl);
                                 const CXXRecordDecl *base_class_decl = cast<CXXRecordDecl>(base_class->getType()->getAs<RecordType>()->getDecl());
-//                                if (base_class->isVirtual())
-//                                    *bit_offset_ptr = record_layout.getVBaseClassOffset(base_class_decl).getQuantity() * 8;
-//                                else
+                                if (base_class->isVirtual())
+                                    *bit_offset_ptr = record_layout.getVBaseClassOffset(base_class_decl).getQuantity() * 8;
+                                else
                                     *bit_offset_ptr = record_layout.getBaseClassOffset(base_class_decl).getQuantity() * 8;
                             }
                             return base_class->getType().getAsOpaquePtr();





More information about the lldb-commits mailing list