From c10915b85165887e1886179338c7d14925f95c52 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Tue, 12 May 2009 23:59:14 +0000 Subject: Add support for GCC compatible builtin setjmp and longjmp intrinsics. This is a supporting preliminary patch for GCC-compatible SjLJ exception handling. Note that these intrinsics are not designed to be invoked directly by the user, but rather used by the front-end as target hooks for exception handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71610 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineFunction.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/llvm/CodeGen/MachineFunction.h') diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index a110e5846a..469ae026f0 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -70,6 +70,10 @@ class MachineFunction : private Annotation { const Function *Fn; const TargetMachine &Target; + // HasBuiltinSetjmp - true if the function uses builtin_setjmp. Used to + // adjust callee-saved register tracking. + bool HasBuiltinSetjmp; + // RegInfo - Information about each register in use in the function. MachineRegisterInfo *RegInfo; @@ -123,6 +127,14 @@ public: /// const TargetMachine &getTarget() const { return Target; } + /// doesHaveBuiltinSetjmp - Return whether this function uses builtin_setjmp + /// + bool doesHaveBuiltinSetjmp() const { return HasBuiltinSetjmp; } + + /// setHasBuiltinSetjmp - Mark whether this function uses builtin_setjmp + /// + void setHasBuiltinSetjmp (bool flag) { HasBuiltinSetjmp = flag; } + /// getRegInfo - Return information about the registers currently in use. /// MachineRegisterInfo &getRegInfo() { return *RegInfo; } -- cgit v1.2.3