aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineFrameInfo.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-05-22 01:47:14 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-05-22 01:47:14 +0000
commit2457f2c66184e978d4ed8fa9e2128effff26cb0b (patch)
tree03c6a5233110f4bf94d5c13134bc803e1dbbdd3c /include/llvm/CodeGen/MachineFrameInfo.h
parent5eb195153950bc7ebfc30649494a78b2096b5ef8 (diff)
downloadexternal_llvm-2457f2c66184e978d4ed8fa9e2128effff26cb0b.zip
external_llvm-2457f2c66184e978d4ed8fa9e2128effff26cb0b.tar.gz
external_llvm-2457f2c66184e978d4ed8fa9e2128effff26cb0b.tar.bz2
Implement @llvm.returnaddress. rdar://8015977.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFrameInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineFrameInfo.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h
index 25622c6..fe2c298 100644
--- a/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/include/llvm/CodeGen/MachineFrameInfo.h
@@ -125,6 +125,10 @@ class MachineFrameInfo {
/// to builtin \@llvm.frameaddress.
bool FrameAddressTaken;
+ /// ReturnAddressTaken - This boolean keeps track of whether there is a call
+ /// to builtin \@llvm.returnaddress.
+ bool ReturnAddressTaken;
+
/// StackSize - The prolog/epilog code inserter calculates the final stack
/// offsets for all of the fixed size objects, updating the Objects list
/// above. It then updates StackSize to contain the number of bytes that need
@@ -193,6 +197,7 @@ public:
StackSize = NumFixedObjects = OffsetAdjustment = MaxAlignment = 0;
HasVarSizedObjects = false;
FrameAddressTaken = false;
+ ReturnAddressTaken = false;
AdjustsStack = false;
HasCalls = false;
StackProtectorIdx = -1;
@@ -223,6 +228,12 @@ public:
bool isFrameAddressTaken() const { return FrameAddressTaken; }
void setFrameAddressIsTaken(bool T) { FrameAddressTaken = T; }
+ /// isReturnAddressTaken - This method may be called any time after instruction
+ /// selection is complete to determine if there is a call to
+ /// \@llvm.returnaddress in this function.
+ bool isReturnAddressTaken() const { return ReturnAddressTaken; }
+ void setReturnAddressIsTaken(bool s) { ReturnAddressTaken = s; }
+
/// getObjectIndexBegin - Return the minimum frame object index.
///
int getObjectIndexBegin() const { return -NumFixedObjects; }