// the function. This field has no meaning for a variable sized element.
int64_t SPOffset;
- StackObject(uint64_t Sz, unsigned Al, int64_t SP, bool IM = false)
+ StackObject(uint64_t Sz, unsigned Al, int64_t SP = 0, bool IM = false)
: Size(Sz), Alignment(Al), isImmutable(IM), SPOffset(SP) {}
};
/// only valid during and after prolog/epilog code insertion.
bool HasCalls;
- /// HasStackProtector - Set to true if this function has stack protectors.
- bool HasStackProtector;
-
/// StackProtectorIdx - The frame index for the stack protector.
int StackProtectorIdx;
///
const TargetFrameInfo &TFI;
public:
- MachineFrameInfo(const TargetFrameInfo &tfi) : TFI(tfi) {
+ explicit MachineFrameInfo(const TargetFrameInfo &tfi) : TFI(tfi) {
StackSize = NumFixedObjects = OffsetAdjustment = MaxAlignment = 0;
HasVarSizedObjects = false;
FrameAddressTaken = false;
HasCalls = false;
- HasStackProtector = false;
StackProtectorIdx = -1;
MaxCallFrameSize = 0;
MMI = 0;
///
bool hasVarSizedObjects() const { return HasVarSizedObjects; }
- /// hasStackProtector - Return true if the function has a stack protector.
- ///
- bool hasStackProtector() const { return HasStackProtector; }
- void setStackProtector(bool T) { HasStackProtector = T; }
-
/// getStackProtectorIndex/setStackProtectorIndex - Return the index for the
/// stack protector object.
///
///
int CreateStackObject(uint64_t Size, unsigned Alignment) {
assert(Size != 0 && "Cannot allocate zero size stack objects!");
- Objects.push_back(StackObject(Size, Alignment, -1));
+ Objects.push_back(StackObject(Size, Alignment));
return (int)Objects.size()-NumFixedObjects-1;
}
///
int CreateVariableSizedObject() {
HasVarSizedObjects = true;
- Objects.push_back(StackObject(0, 1, -1));
+ Objects.push_back(StackObject(0, 1));
return (int)Objects.size()-NumFixedObjects-1;
}