summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFrameInfo.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-09-28 03:36:43 +0000
committerBill Wendling <isanbard@gmail.com>2011-09-28 03:36:43 +0000
commit6ef94175d1bbab95f195770bb3c559b3ab38c4e5 (patch)
tree880bb6e6f6958f077b8d94873efe04fc4db22a99 /include/llvm/CodeGen/MachineFrameInfo.h
parent2b6bd7ba5819d8c73c89291c6de89a86dbbffe9c (diff)
downloadllvm-6ef94175d1bbab95f195770bb3c559b3ab38c4e5.tar.gz
llvm-6ef94175d1bbab95f195770bb3c559b3ab38c4e5.tar.bz2
llvm-6ef94175d1bbab95f195770bb3c559b3ab38c4e5.tar.xz
Create and use an llvm.eh.sjlj.functioncontext intrinsic.
This intrinsic is used to pass the index of the function context to the back-end for further processing. The back-end is in charge of filling in the rest of the entries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFrameInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineFrameInfo.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h
index 4ea6aa3396..b347ca8e68 100644
--- a/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/include/llvm/CodeGen/MachineFrameInfo.h
@@ -174,6 +174,10 @@ class MachineFrameInfo {
/// StackProtectorIdx - The frame index for the stack protector.
int StackProtectorIdx;
+ /// FunctionContextIdx - The frame index for the function context. Used for
+ /// SjLj exceptions.
+ int FunctionContextIdx;
+
/// MaxCallFrameSize - This contains the size of the largest call frame if the
/// target uses frame setup/destroy pseudo instructions (as defined in the
/// TargetFrameInfo class). This information is important for frame pointer
@@ -220,6 +224,7 @@ public:
AdjustsStack = false;
HasCalls = false;
StackProtectorIdx = -1;
+ FunctionContextIdx = -1;
MaxCallFrameSize = 0;
CSIValid = false;
LocalFrameSize = 0;
@@ -244,6 +249,11 @@ public:
int getStackProtectorIndex() const { return StackProtectorIdx; }
void setStackProtectorIndex(int I) { StackProtectorIdx = I; }
+ /// getFunctionContextIndex/setFunctionContextIndex - Return the index for the
+ /// function context object. This object is used for SjLj exceptions.
+ int getFunctionContextIndex() const { return FunctionContextIdx; }
+ void setFunctionContextIndex(int I) { FunctionContextIdx = I; }
+
/// isFrameAddressTaken - This method may be called any time after instruction
/// selection is complete to determine if there is a call to
/// \@llvm.frameaddress in this function.