14#ifndef LLVM_CLANG_BASIC_STACK_H
15#define LLVM_CLANG_BASIC_STACK_H
19#include "llvm/ADT/STLExtras.h"
20#include "llvm/Support/Compiler.h"
36 llvm::function_ref<
void()> Fn);
41 llvm::function_ref<
void()> Fn) {
42#if LLVM_ENABLE_THREADS
static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)
Produce a diagnostic highlighting some portion of a literal.
The JSON file list parser is used to communicate input to InstallAPI.
void runWithSufficientStackSpaceSlow(llvm::function_ref< void()> Diag, llvm::function_ref< void()> Fn)
void noteBottomOfStack()
Call this once on each thread, as soon after starting the thread as feasible, to note the approximate...
bool isStackNearlyExhausted()
Determine whether the stack is nearly exhausted.
constexpr size_t DesiredStackSize
The amount of stack space that Clang would like to be provided with.
void runWithSufficientStackSpace(llvm::function_ref< void()> Diag, llvm::function_ref< void()> Fn)
Run a given function on a stack with "sufficient" space.