From 44a28f7d77cfce8a8df075f93bb80871dca3d925 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 4 Apr 2007 07:38:25 +0000 Subject: [PATCH] Add isFixedObjectIndex. It returns true if the stack slot index is for a fixed stack object. llvm-svn: 35659 --- llvm/include/llvm/CodeGen/MachineFrameInfo.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/llvm/include/llvm/CodeGen/MachineFrameInfo.h b/llvm/include/llvm/CodeGen/MachineFrameInfo.h index 6f13eec68768..189c5cc97903 100644 --- a/llvm/include/llvm/CodeGen/MachineFrameInfo.h +++ b/llvm/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. ///