Skip to content

Commit 2e68068

Browse files
authored
Merge pull request #6332 from akyrtzi/pr/stable/couple-picks
[stable] A couple of cherry-picks from next related to CAS/caching
2 parents 27c1daf + e7a93ba commit 2e68068

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

clang/tools/driver/cc1_main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class CachingOutputs {
244244
clang::cas::CompileJobCacheResult::Builder CachedResultBuilder;
245245
std::string OutputFile;
246246
std::string DependenciesFile;
247-
std::unique_ptr<cas::CachingDiagnosticsProcessor> DiagProcessor;
247+
std::unique_ptr<clang::cas::CachingDiagnosticsProcessor> DiagProcessor;
248248
};
249249

250250
/// Store and retrieve compilation artifacts using \p llvm::cas::ObjectStore and
@@ -551,8 +551,8 @@ CachingOutputs::CachingOutputs(CompilerInstance &Clang,
551551
OutputFile = fixupRelativePath(FrontendOpts.OutputFile, FM);
552552
DependenciesFile =
553553
fixupRelativePath(Invocation.getDependencyOutputOpts().OutputFile, FM);
554-
DiagProcessor =
555-
std::make_unique<cas::CachingDiagnosticsProcessor>(PrefixMapper, FM);
554+
DiagProcessor = std::make_unique<clang::cas::CachingDiagnosticsProcessor>(
555+
PrefixMapper, FM);
556556
}
557557

558558
Expected<bool> ObjectStoreCachingOutputs::tryReplayCachedResult(

clang/tools/driver/cc1depscan_main.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -848,12 +848,15 @@ void ScanServer::start(bool Exclusive) {
848848

849849
if (cc1depscand::bindToSocket(BasePath, ListenSocket))
850850
reportError(StringRef() + "cannot bind to socket" + ": " + strerror(errno));
851+
852+
unsigned MaxBacklog =
853+
llvm::hardware_concurrency().compute_thread_count() * 16;
854+
if (::listen(ListenSocket, MaxBacklog))
855+
reportError("cannot listen to socket");
851856
}
852857

853858
int ScanServer::listen() {
854859
llvm::ThreadPool Pool;
855-
if (::listen(ListenSocket, /*MaxBacklog=*/Pool.getThreadCount() * 16))
856-
reportError("cannot listen to socket");
857860

858861
DiagnosticsEngine Diags(new DiagnosticIDs(), new DiagnosticOptions());
859862
CASOptions CASOpts;

0 commit comments

Comments
 (0)