clang 20.0.0git
|
#include "clang/Basic/StackExhaustionHandler.h"
Public Member Functions | |
StackExhaustionHandler (DiagnosticsEngine &diags) | |
void | runWithSufficientStackSpace (SourceLocation Loc, llvm::function_ref< void()> Fn) |
Run some code with "sufficient" stack space. | |
void | warnOnStackNearlyExhausted (SourceLocation Loc) |
Check to see if we're low on stack space and produce a warning if we're low on stack space (Currently, at least 256Kis guaranteed). | |
Definition at line 21 of file StackExhaustionHandler.h.
|
inline |
Definition at line 23 of file StackExhaustionHandler.h.
void clang::StackExhaustionHandler::runWithSufficientStackSpace | ( | SourceLocation | Loc, |
llvm::function_ref< void()> | Fn | ||
) |
Run some code with "sufficient" stack space.
(Currently, at least 256K is guaranteed). Produces a warning if we're low on stack space and allocates more in that case. Use this in code that may recurse deeply to avoid stack overflow.
Definition at line 18 of file StackExhaustionHandler.cpp.
References Loc, and clang::runWithSufficientStackSpace().
Referenced by clang::Sema::runWithSufficientStackSpace(), clang::ASTReader::runWithSufficientStackSpace(), and clang::CodeGen::CodeGenModule::runWithSufficientStackSpace().
void clang::StackExhaustionHandler::warnOnStackNearlyExhausted | ( | SourceLocation | Loc | ) |
Check to see if we're low on stack space and produce a warning if we're low on stack space (Currently, at least 256Kis guaranteed).
Definition at line 23 of file StackExhaustionHandler.cpp.
References clang::isStackNearlyExhausted(), and Loc.
Referenced by clang::Sema::pushCodeSynthesisContext().