Esempio n. 1
0
uint32_t SymbolFilePDB::FindTypes(
    const lldb_private::SymbolContext &sc,
    const lldb_private::ConstString &name,
    const lldb_private::CompilerDeclContext *parent_decl_ctx, bool append,
    uint32_t max_matches,
    llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
    lldb_private::TypeMap &types) {
  if (!append)
    types.Clear();
  if (!name)
    return 0;

  searched_symbol_files.clear();
  searched_symbol_files.insert(this);

  std::string name_str = name.AsCString();

  // If this might be a regex, we have to return EVERY symbol and process them
  // one by one, which is going
  // to destroy performance on large PDB files.  So try really hard not to use a
  // regex match.
  if (name_str.find_first_of("[]?*.-+\\") != std::string::npos)
    FindTypesByRegex(name_str, max_matches, types);
  else
    FindTypesByName(name_str, max_matches, types);
  return types.GetSize();
}
Esempio n. 2
0
extern "C" void _Py_ReleaseInternedStrings() noexcept {
    // printf("%ld interned strings\n", interned_strings.size());
    for (const auto& p : interned_strings) {
        Py_DECREF(p);
    }
    interned_strings.clear();
}