diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h index 0781d57feb5a64..949e80a43f0e88 100644 --- a/llvm/include/llvm/LTO/LTO.h +++ b/llvm/include/llvm/LTO/LTO.h @@ -68,8 +68,8 @@ std::string computeLTOCacheKey( const FunctionImporter::ExportSetTy &ExportList, const std::map &ResolvedODR, const GVSummaryMapTy &DefinedGlobals, - const std::set &CfiFunctionDefs = {}, - const std::set &CfiFunctionDecls = {}); + const DenseSet &CfiFunctionDefs = {}, + const DenseSet &CfiFunctionDecls = {}); namespace lto { diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index f69e089edf42e7..cb3369d93754d5 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -95,8 +95,8 @@ std::string llvm::computeLTOCacheKey( const FunctionImporter::ExportSetTy &ExportList, const std::map &ResolvedODR, const GVSummaryMapTy &DefinedGlobals, - const std::set &CfiFunctionDefs, - const std::set &CfiFunctionDecls) { + const DenseSet &CfiFunctionDefs, + const DenseSet &CfiFunctionDecls) { // Compute the unique hash for this entry. // This is based on the current compiler version, the module itself, the // export list, the hash for every single module in the import list, the @@ -237,9 +237,9 @@ std::string llvm::computeLTOCacheKey( std::set UsedTypeIds; auto AddUsedCfiGlobal = [&](GlobalValue::GUID ValueGUID) { - if (CfiFunctionDefs.count(ValueGUID)) + if (CfiFunctionDefs.contains(ValueGUID)) UsedCfiDefs.insert(ValueGUID); - if (CfiFunctionDecls.count(ValueGUID)) + if (CfiFunctionDecls.contains(ValueGUID)) UsedCfiDecls.insert(ValueGUID); }; @@ -1429,8 +1429,8 @@ class InProcessThinBackend : public ThinBackendProc { DefaultThreadPool BackendThreadPool; AddStreamFn AddStream; FileCache Cache; - std::set CfiFunctionDefs; - std::set CfiFunctionDecls; + DenseSet CfiFunctionDefs; + DenseSet CfiFunctionDecls; std::optional Err; std::mutex ErrMu;