sammccall added inline comments.

================
Comment at: clang-tools-extra/clangd/support/Threading.cpp:102
     llvm::set_thread_name(Name);
+    // Mark the bottom of the stack for clang to be aware of the stack usage 
and
+    // prevent stack overflow.
----------------
ugh, I forgot: this function is part of clangBasic (which is not small!) and 
clangdSupport shouldn't depend on clang at all.

I'm afraid the easiest fix is to move this to the tasks in the relevant 
callsites:
- indexStdlib() in ClangdServer.cpp
- ASTWorker::run(), PreambleWorker::run(), TUScheduler::runWithPreamble() in 
TUScheduler.cpp
- BackgroundIndex() in index/Background.cpp

(I guess principled thing would be to make noteBottomOfStack() part of llvm 
Support, but that seems complicated)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158967/new/

https://reviews.llvm.org/D158967

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to