From: Evan Cheng Date: Wed, 4 Apr 2007 07:38:25 +0000 (+0000) Subject: Add isFixedObjectIndex. It returns true if the stack slot index is for a fixed stack... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a96c5b30408a42cd6b8f335bd0816f2b2e58bdf5;p=oota-llvm.git 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 --- diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h index 6f13eec6876..189c5cc9790 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. ///