[llvm-branch-commits] [lldb] r270112 - This is a cherry-pick of commit r260618

Francis Ricci via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu May 19 13:35:10 PDT 2016


Author: fjricci
Date: Thu May 19 15:35:07 2016
New Revision: 270112

URL: http://llvm.org/viewvc/llvm-project?rev=270112&view=rev
Log:
This is a cherry-pick of commit r260618

Author:    Greg Clayton <gclayton at apple.com>
Date:      Thu Feb 11 23:36:57 2016 +0000

Removed a bad assertion:

assert(((SymbolFileDWARF*)m_ast.GetSymbolFile())->UserIDMatches(die.GetDIERef().GetUID()) &&
       "Adding incorrect type to forward declaration map");

The problem is that "m_ast.GetSymbolFile()" can return a SymbolFileDWARFDebugMap. The code is doing the right thing if the assertion is ignored.

<rdar://problem/24437972>

Modified:
    lldb/branches/release_38/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

Modified: lldb/branches/release_38/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_38/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=270112&r1=270111&r2=270112&view=diff
==============================================================================
--- lldb/branches/release_38/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (original)
+++ lldb/branches/release_38/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Thu May 19 15:35:07 2016
@@ -863,8 +863,10 @@ DWARFASTParserClang::ParseTypeFromDWARF
                             // When the definition needs to be defined.
                             assert(!dwarf->GetForwardDeclClangTypeToDie().count(ClangASTContext::RemoveFastQualifiers(clang_type).GetOpaqueQualType()) &&
                                    "Type already in the forward declaration map!");
-                            assert(((SymbolFileDWARF*)m_ast.GetSymbolFile())->UserIDMatches(die.GetDIERef().GetUID()) &&
-                                   "Adding incorrect type to forward declaration map");
+                            // Can't assume m_ast.GetSymbolFile() is actually a SymbolFileDWARF, it can be a
+                            // SymbolFileDWARFDebugMap for Apple binaries.
+                            //assert(((SymbolFileDWARF*)m_ast.GetSymbolFile())->UserIDMatches(die.GetDIERef().GetUID()) &&
+                            //       "Adding incorrect type to forward declaration map");
                             dwarf->GetForwardDeclDieToClangType()[die.GetDIE()] = clang_type.GetOpaqueQualType();
                             dwarf->GetForwardDeclClangTypeToDie()[ClangASTContext::RemoveFastQualifiers(clang_type).GetOpaqueQualType()] = die.GetDIERef();
                             m_ast.SetHasExternalStorage (clang_type.GetOpaqueQualType(), true);




More information about the llvm-branch-commits mailing list