diff options
Diffstat (limited to 'llvm/lib/CodeGen/SafeStackLayout.h')
| -rw-r--r-- | llvm/lib/CodeGen/SafeStackLayout.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SafeStackLayout.h b/llvm/lib/CodeGen/SafeStackLayout.h index f0db1b42aa00..b72450e57080 100644 --- a/llvm/lib/CodeGen/SafeStackLayout.h +++ b/llvm/lib/CodeGen/SafeStackLayout.h @@ -22,7 +22,7 @@ namespace safestack { /// Compute the layout of an unsafe stack frame. class StackLayout { - unsigned MaxAlignment; + uint64_t MaxAlignment; struct StackRegion { unsigned Start; @@ -39,23 +39,24 @@ class StackLayout { struct StackObject { const Value *Handle; - unsigned Size, Alignment; + unsigned Size; + uint64_t Alignment; StackLifetime::LiveRange Range; }; SmallVector<StackObject, 8> StackObjects; DenseMap<const Value *, unsigned> ObjectOffsets; - DenseMap<const Value *, unsigned> ObjectAlignments; + DenseMap<const Value *, uint64_t> ObjectAlignments; void layoutObject(StackObject &Obj); public: - StackLayout(unsigned StackAlignment) : MaxAlignment(StackAlignment) {} + StackLayout(uint64_t StackAlignment) : MaxAlignment(StackAlignment) {} /// Add an object to the stack frame. Value pointer is opaque and used as a /// handle to retrieve the object's offset in the frame later. - void addObject(const Value *V, unsigned Size, unsigned Alignment, + void addObject(const Value *V, unsigned Size, uint64_t Alignment, const StackLifetime::LiveRange &Range); /// Run the layout computation for all previously added objects. @@ -65,13 +66,13 @@ public: unsigned getObjectOffset(const Value *V) { return ObjectOffsets[V]; } /// Returns the alignment of the object - unsigned getObjectAlignment(const Value *V) { return ObjectAlignments[V]; } + uint64_t getObjectAlignment(const Value *V) { return ObjectAlignments[V]; } /// Returns the size of the entire frame. unsigned getFrameSize() { return Regions.empty() ? 0 : Regions.back().End; } /// Returns the alignment of the frame. - unsigned getFrameAlignment() { return MaxAlignment; } + uint64_t getFrameAlignment() { return MaxAlignment; } void print(raw_ostream &OS); }; |
