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"
39 llvm::function_ref<
void()> Fn);
44 llvm::function_ref<
void()> Fn) {
45#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)
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 noteBottomOfStack(bool ForceSet=false)
Call this once on each thread, as soon after starting the thread as feasible, to note the approximate...
void runWithSufficientStackSpace(llvm::function_ref< void()> Diag, llvm::function_ref< void()> Fn)
Run a given function on a stack with "sufficient" space.