10#include "llvm/Config/config.h"
14# include <sys/resource.h>
26#if __GNUC__ || __has_builtin(__builtin_frame_address)
27 return (uintptr_t)__builtin_frame_address(0);
28#elif defined(_MSC_VER)
29 return (uintptr_t)_AddressOfReturnAddress();
31 volatile char CharOnStack = 0;
37 char *
volatile Ptr = &CharOnStack;
38 return (uintptr_t)Ptr;
45 getrlimit(RLIMIT_STACK, &RL);
57 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()