aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-04-04 07:38:25 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-04-04 07:38:25 +0000
commita96c5b30408a42cd6b8f335bd0816f2b2e58bdf5 (patch)
tree8432ee99c53c50502bdf1d7d313af22f43cf11f0 /include
parent710216275b93b332bc69f41a1d4553197b64edf8 (diff)
downloadexternal_llvm-a96c5b30408a42cd6b8f335bd0816f2b2e58bdf5.zip
external_llvm-a96c5b30408a42cd6b8f335bd0816f2b2e58bdf5.tar.gz
external_llvm-a96c5b30408a42cd6b8f335bd0816f2b2e58bdf5.tar.bz2
Add isFixedObjectIndex. It returns true if the stack slot index is for a fixed stack object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineFrameInfo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h
index 6f13eec..189c5cc 100644
--- a/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/include/llvm/CodeGen/MachineFrameInfo.h
@@ -263,6 +263,12 @@ public:
return -++NumFixedObjects;
}
+ /// isFixedObjectIndex - Returns true if the specified index corresponds to a
+ /// fixed stack object.
+ bool isFixedObjectIndex(int ObjectIdx) const {
+ return ObjectIdx < 0 && (ObjectIdx >= -(int)NumFixedObjects);
+ }
+
/// CreateStackObject - Create a new statically sized stack object, returning
/// a postive identifier to represent it.
///