diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
commit | eb11fae6d08f479c0799db45860a98af528fa6e7 (patch) | |
tree | 44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /lib/CodeGen/SafeStackLayout.h | |
parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) |
Notes
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; } |