@@ -85,8 +85,6 @@ extern cl::opt<std::optional<uint64_t>, false, remarks::HotnessThresholdParser>
85
85
extern cl::opt<std::string> RemarksFormat;
86
86
}
87
87
88
- namespace {
89
-
90
88
// Default to using all available threads in the system, but using only one
91
89
// thred per core, as indicated by the usage of
92
90
// heavyweight_hardware_concurrency() below.
@@ -326,8 +324,8 @@ computeGUIDPreservedSymbols(const lto::InputFile &File,
326
324
return GUIDPreservedSymbols;
327
325
}
328
326
329
- std::unique_ptr<MemoryBuffer> codegenModule (Module &TheModule,
330
- TargetMachine &TM) {
327
+ static std::unique_ptr<MemoryBuffer> codegenModule (Module &TheModule,
328
+ TargetMachine &TM) {
331
329
SmallVector<char , 128 > OutputBuffer;
332
330
333
331
// CodeGen
@@ -347,6 +345,7 @@ std::unique_ptr<MemoryBuffer> codegenModule(Module &TheModule,
347
345
std::move (OutputBuffer), /* RequiresNullTerminator=*/ false );
348
346
}
349
347
348
+ namespace {
350
349
// / Manage caching for a single Module.
351
350
class ModuleCacheEntry {
352
351
SmallString<128 > EntryPath;
@@ -424,6 +423,7 @@ class ModuleCacheEntry {
424
423
toString (std::move (Err)).c_str ()));
425
424
}
426
425
};
426
+ } // end anonymous namespace
427
427
428
428
static std::unique_ptr<MemoryBuffer>
429
429
ProcessThinLTOModule (Module &TheModule, ModuleSummaryIndex &Index,
@@ -541,8 +541,6 @@ static void initTMBuilder(TargetMachineBuilder &TMBuilder,
541
541
TMBuilder.TheTriple = std::move (TheTriple);
542
542
}
543
543
544
- } // end anonymous namespace
545
-
546
544
void ThinLTOCodeGenerator::addModule (StringRef Identifier, StringRef Data) {
547
545
MemoryBufferRef Buffer (Data, Identifier);
548
546
0 commit comments