10#include "llvm/Config/config.h"
14# include <sys/resource.h>
28#if __GNUC__ || __has_builtin(__builtin_frame_address)
29 return (uintptr_t)__builtin_frame_address(0);
30#elif defined(_MSC_VER)
31 return (uintptr_t)_AddressOfReturnAddress();
33 volatile char CharOnStack = 0;
39 char *
volatile Ptr = &CharOnStack;
40 return (uintptr_t)Ptr;
47 getrlimit(RLIMIT_STACK, &RL);
59 StackSize == 0 ? std::nullopt : std::optional<unsigned>(StackSize), Fn);
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void runOnNewStack(unsigned StackSize, function_ref< void()> Fn)
Runs Fn on a new stack of at least the given size.
LLVM_ABI unsigned getDefaultStackSize()
LLVM_ABI uintptr_t getStackPointer()