diff options
Diffstat (limited to 'lib/CodeGen/SafeStackLayout.h')
-rw-r--r-- | lib/CodeGen/SafeStackLayout.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SafeStackLayout.h b/lib/CodeGen/SafeStackLayout.h index 7c1292f251f7..ac531d800f6e 100644 --- a/lib/CodeGen/SafeStackLayout.h +++ b/lib/CodeGen/SafeStackLayout.h @@ -47,6 +47,7 @@ class StackLayout { SmallVector<StackObject, 8> StackObjects; DenseMap<const Value *, unsigned> ObjectOffsets; + DenseMap<const Value *, unsigned> ObjectAlignments; void layoutObject(StackObject &Obj); @@ -64,6 +65,9 @@ public: /// Returns the offset to the object start in the stack frame. unsigned getObjectOffset(const Value *V) { return ObjectOffsets[V]; } + /// Returns the alignment of the object + unsigned getObjectAlignment(const Value *V) { return ObjectAlignments[V]; } + /// Returns the size of the entire frame. unsigned getFrameSize() { return Regions.empty() ? 0 : Regions.back().End; } |