summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFunction.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-05-26 00:32:40 +0000
committerBill Wendling <isanbard@gmail.com>2010-05-26 00:32:40 +0000
commitbe22683202731127a5128db8be404edcee91defd (patch)
tree4cdd751a636f97cf2243eed3b1e65cdfde26b64f /include/llvm/CodeGen/MachineFunction.h
parent6a45d681e53a99b4c4f63e0b1664626a596a8151 (diff)
downloadllvm-be22683202731127a5128db8be404edcee91defd.tar.gz
llvm-be22683202731127a5128db8be404edcee91defd.tar.bz2
llvm-be22683202731127a5128db8be404edcee91defd.tar.xz
Dale and Evan suggested putting the "check for setjmp" much earlier in the
machine code generation. That's a good idea, so I made it so. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104655 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 595872ad2d..ec25bc1319 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -114,9 +114,13 @@ class MachineFunction {
///
unsigned FunctionNumber;
- /// The alignment of the function.
+ /// Alignment - The alignment of the function.
unsigned Alignment;
+ /// HasReturnsTwiceCall - Returns true if there's a call with a
+ /// "returns_twice" attribute, like setjmp.
+ bool HasReturnsTwiceCall;
+
MachineFunction(const MachineFunction &); // DO NOT IMPLEMENT
void operator=(const MachineFunction&); // DO NOT IMPLEMENT
public:
@@ -181,6 +185,15 @@ public:
void EnsureAlignment(unsigned A) {
if (Alignment < A) Alignment = A;
}
+
+ /// hasReturnsTwiceCall - Returns true if there's a call with a
+ /// "returns_twice" attribute, like setjmp.
+ bool hasReturnsTwiceCall() const {
+ return HasReturnsTwiceCall;
+ }
+ void setReturnsTwiceCall(bool B) {
+ HasReturnsTwiceCall = B;
+ }
/// getInfo - Keep track of various per-function pieces of information for
/// backends that would like to do so.