clang: include/clang/Basic/Stack.h Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_CLANG_BASIC_STACK_H

15#define LLVM_CLANG_BASIC_STACK_H

16

17#include

18

19#include "llvm/ADT/STLExtras.h"

20#include "llvm/Support/Compiler.h"

21

23

24

25

27

28

29

30

31

32

34

35

37

39 llvm::function_ref<void()> Fn);

40

41

42

44 llvm::function_ref<void()> Fn) {

45#if LLVM_ENABLE_THREADS

48 else

49 Fn();

50#else

53 Fn();

54#endif

55 }

56}

57

58#endif

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.

Definition Stack.h:26

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.

Definition Stack.h:43