@@ -85,8 +85,6 @@ extern cl::opt<std::optional<uint64_t>, false, remarks::HotnessThresholdParser>
8585extern cl::opt<std::string> RemarksFormat;
8686}
8787
88- namespace {
89-
9088// Default to using all available threads in the system, but using only one
9189// thred per core, as indicated by the usage of
9290// heavyweight_hardware_concurrency() below.
@@ -326,8 +324,8 @@ computeGUIDPreservedSymbols(const lto::InputFile &File,
326324 return GUIDPreservedSymbols;
327325}
328326
329- std::unique_ptr<MemoryBuffer> codegenModule (Module &TheModule,
330- TargetMachine &TM) {
327+ static std::unique_ptr<MemoryBuffer> codegenModule (Module &TheModule,
328+ TargetMachine &TM) {
331329 SmallVector<char , 128 > OutputBuffer;
332330
333331 // CodeGen
@@ -347,6 +345,7 @@ std::unique_ptr<MemoryBuffer> codegenModule(Module &TheModule,
347345 std::move (OutputBuffer), /* RequiresNullTerminator=*/ false );
348346}
349347
348+ namespace {
350349// / Manage caching for a single Module.
351350class ModuleCacheEntry {
352351 SmallString<128 > EntryPath;
@@ -424,6 +423,7 @@ class ModuleCacheEntry {
424423 toString (std::move (Err)).c_str ()));
425424 }
426425};
426+ } // end anonymous namespace
427427
428428static std::unique_ptr<MemoryBuffer>
429429ProcessThinLTOModule (Module &TheModule, ModuleSummaryIndex &Index,
@@ -541,8 +541,6 @@ static void initTMBuilder(TargetMachineBuilder &TMBuilder,
541541 TMBuilder.TheTriple = std::move (TheTriple);
542542}
543543
544- } // end anonymous namespace
545-
546544void ThinLTOCodeGenerator::addModule (StringRef Identifier, StringRef Data) {
547545 MemoryBufferRef Buffer (Data, Identifier);
548546
0 commit comments