aboutsummaryrefslogtreecommitdiffstats
path: root/ortho/mcode/ortho_code-consts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-01-24 06:54:45 +0100
committerTristan Gingold <tgingold@free.fr>2014-01-24 06:54:45 +0100
commitdd191d5f5d6ac2dc48ed1ee4fb4d1bd09dce8b73 (patch)
tree9f0a22326ca6813321f2b73729049f8ba07072a0 /ortho/mcode/ortho_code-consts.adb
parent9567c15d0db2d39ce8ea83b3dff96e7e8f852243 (diff)
downloadghdl-dd191d5f5d6ac2dc48ed1ee4fb4d1bd09dce8b73.tar.gz
ghdl-dd191d5f5d6ac2dc48ed1ee4fb4d1bd09dce8b73.tar.bz2
ghdl-dd191d5f5d6ac2dc48ed1ee4fb4d1bd09dce8b73.zip
mcode: add get_alignof_type.
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 c6d2020d8..1122b8e34 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