[SymbolFilePDB] Ignore compiler generated functions when creating the LLDB type from...
authorAaron Smith <aaron.smith@microsoft.com>
Thu, 22 Mar 2018 19:21:34 +0000 (19:21 +0000)
committerAaron Smith <aaron.smith@microsoft.com>
Thu, 22 Mar 2018 19:21:34 +0000 (19:21 +0000)
llvm-svn: 328230

lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp

index 9fd5f7d01f50c8260a24e1070c580a4dfc464366..e9d10d0934ff12a575cf0d3aecc49d2bafd49c05 100644 (file)
@@ -312,6 +312,9 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) {
     std::string name;
     PDBSymbolTypeFunctionSig *func_sig = nullptr;
     if (auto pdb_func = llvm::dyn_cast<PDBSymbolFunc>(&type)) {
+      if (pdb_func->isCompilerGenerated())
+        return nullptr;
+
       auto sig = pdb_func->getSignature();
       if (!sig)
         return nullptr;
index 915a4ff91523925e14797c4533abbd5749b96639..c958d0c94a86102e3711af81293bfd27b4830a9f 100644 (file)
@@ -130,7 +130,7 @@ uint32_t SymbolFilePDB::CalculateAbilities() {
       }
     }
   }
-  if (!m_session_up.get())
+  if (!m_session_up)
     return 0;
 
   auto enum_tables_up = m_session_up->getEnumTables();
@@ -507,7 +507,7 @@ lldb_private::Type *SymbolFilePDB::ResolveTypeUID(lldb::user_id_t type_uid) {
     return nullptr;
 
   lldb::TypeSP result = pdb->CreateLLDBTypeFromPDBType(*pdb_type);
-  if (result.get()) {
+  if (result) {
     m_types.insert(std::make_pair(type_uid, result));
     auto type_list = GetTypeList();
     if (type_list)
@@ -637,7 +637,7 @@ uint32_t SymbolFilePDB::ResolveSymbolContext(
 
       SymbolContext sc;
       auto cu = ParseCompileUnitForUID(compiland->getSymIndexId());
-      if (!cu.get())
+      if (!cu)
         continue;
       sc.comp_unit = cu.get();
       sc.module_sp = cu->GetModule();
@@ -1132,7 +1132,7 @@ size_t SymbolFilePDB::GetTypes(lldb_private::SymbolContextScope *sc_scope,
   } else {
     for (uint32_t cu_idx = 0; cu_idx < GetNumCompileUnits(); ++cu_idx) {
       auto cu_sp = ParseCompileUnitAtIndex(cu_idx);
-      if (cu_sp.get()) {
+      if (cu_sp) {
         if (auto compiland_up = GetPDBCompilandByUID(cu_sp->GetID()))
           GetTypesForPDBSymbol(*compiland_up, type_mask, type_collection);
       }