本文整理汇总了C++中llvm::DenseSet::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ DenseSet::clear方法的具体用法?C++ DenseSet::clear怎么用?C++ DenseSet::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类llvm::DenseSet
的用法示例。
在下文中一共展示了DenseSet::clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FindTypes
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();
}
示例2:
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();
}