[Lldb-commits] [lldb] r184388 - Unique types a bit more using the clang type to make sure we don't get multiple copies of the same type due to the debug info having multiple types that get uniqued.
Greg Clayton
gclayton at apple.com
Wed Jun 19 18:23:19 PDT 2013
Author: gclayton
Date: Wed Jun 19 20:23:18 2013
New Revision: 184388
URL: http://llvm.org/viewvc/llvm-project?rev=184388&view=rev
Log:
Unique types a bit more using the clang type to make sure we don't get multiple copies of the same type due to the debug info having multiple types that get uniqued.
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=184388&r1=184387&r2=184388&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Wed Jun 19 20:23:18 2013
@@ -407,11 +407,17 @@ SymbolFileDWARF::GetTypes (SymbolContext
// });
// }
+ std::set<clang_type_t> clang_type_set;
size_t num_types_added = 0;
for (Type *type : type_set)
{
- type_list.Insert (type->shared_from_this());
- ++num_types_added;
+ clang_type_t clang_type = type->GetClangForwardType();
+ if (clang_type_set.find(clang_type) == clang_type_set.end())
+ {
+ clang_type_set.insert(clang_type);
+ type_list.Insert (type->shared_from_this());
+ ++num_types_added;
+ }
}
return num_types_added;
}
More information about the lldb-commits
mailing list