Index: COFF/PDB.cpp =================================================================== --- COFF/PDB.cpp +++ COFF/PDB.cpp @@ -53,6 +53,7 @@ #include "llvm/Support/Errc.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/JamCRC.h" +#include "llvm/Support/Parallel.h" #include "llvm/Support/Path.h" #include "llvm/Support/ScopedPrinter.h" #include @@ -213,7 +214,7 @@ std::vector SectionMap; /// Type index mappings of type server PDBs that we've loaded so far. - std::map TypeServerIndexMappings; + std::map TypeServerIndexMappings; /// Type index mappings of precompiled objects type map that we've loaded so /// far. @@ -221,7 +222,7 @@ /// List of TypeServer PDBs which cannot be loaded. /// Cached to prevent repeated load attempts. - std::map MissingTypeServerPDBs; + std::map MissingTypeServerPDBs; }; class DebugSHandler { @@ -507,7 +508,7 @@ } static Expected> -tryToLoadPDB(const GUID &GuidFromObj, StringRef TSPath) { +tryToLoadPDB(const codeview::GUID &GuidFromObj, StringRef TSPath) { // Ensure the file exists before anything else. We want to return ENOENT, // "file not found", even if the path points to a removable device (in which // case the return message would be EAGAIN, "resource unavailable try again") @@ -550,7 +551,7 @@ TypeDeserializer::deserializeAs(const_cast(FirstType), TS)) fatal("error reading record: " + toString(std::move(EC))); - const GUID &TSId = TS.getGuid(); + const codeview::GUID &TSId = TS.getGuid(); StringRef TSPath = TS.getName(); // First, check if the PDB has previously failed to load. @@ -1387,10 +1388,10 @@ if (!Publics.empty()) { // Sort the public symbols and add them to the stream. - std::sort(Publics.begin(), Publics.end(), - [](const PublicSym32 &L, const PublicSym32 &R) { - return L.Name < R.Name; - }); + sort(parallel::par, Publics.begin(), Publics.end(), + [](const PublicSym32 &L, const PublicSym32 &R) { + return L.Name < R.Name; + }); for (const PublicSym32 &Pub : Publics) GsiBuilder.addPublicSymbol(Pub); }