summaryrefslogtreecommitdiff
path: root/ortho/mcode/ortho_code-consts.adb
diff options
context:
space:
mode:
Diffstat (limited to 'ortho/mcode/ortho_code-consts.adb')
-rw-r--r--ortho/mcode/ortho_code-consts.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/ortho/mcode/ortho_code-consts.adb b/ortho/mcode/ortho_code-consts.adb
index c6d2020..1122b8e 100644
--- a/ortho/mcode/ortho_code-consts.adb
+++ b/ortho/mcode/ortho_code-consts.adb
@@ -488,6 +488,13 @@ package body Ortho_Code.Consts is
end if;
end New_Alignof;
+ function Get_Alignof_Type (Cst : O_Cnode) return O_Tnode
+ is
+ function To_Cnode_Sizeof is new Ada.Unchecked_Conversion
+ (Cnode_Common, Cnode_Sizeof);
+ begin
+ return To_Cnode_Sizeof (Cnodes.Table (Cst + 1)).Atype;
+ end Get_Alignof_Type;
function New_Offsetof (Field : O_Fnode; Rtype : O_Tnode) return O_Cnode is
begin