diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-02-21 07:56:25 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-03-08 06:25:52 +0100 |
commit | 77f983ae738583dfce7c3c3aaab5efde16519af0 (patch) | |
tree | d7f17de16b115bfc3ff52ad0f6b04e840800dae8 /src/ortho/debug/ortho_debug.adb | |
parent | a7bb5f6944b410d2b02b1ae5aa9fdc10c68d7519 (diff) | |
download | ghdl-77f983ae738583dfce7c3c3aaab5efde16519af0.tar.gz ghdl-77f983ae738583dfce7c3c3aaab5efde16519af0.tar.bz2 ghdl-77f983ae738583dfce7c3c3aaab5efde16519af0.zip |
ortho: add new_default_value to initialize a variable.
Diffstat (limited to 'src/ortho/debug/ortho_debug.adb')
-rw-r--r-- | src/ortho/debug/ortho_debug.adb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ortho/debug/ortho_debug.adb b/src/ortho/debug/ortho_debug.adb index 218fd9671..6e9b2b89d 100644 --- a/src/ortho/debug/ortho_debug.adb +++ b/src/ortho/debug/ortho_debug.adb @@ -399,11 +399,20 @@ package body Ortho_Debug is if Ltype.Kind /= ON_Access_Type then raise Type_Error; end if; - return new O_Cnode_Null_Lit_Type'(Kind => OC_Null_Lit, + return new O_Cnode_Null_Lit_Type'(Kind => OC_Null_Lit, Ctype => Ltype, Ref => False); end New_Null_Access; + function New_Default_Value (Ltype : O_Tnode) return O_Cnode + is + subtype O_Cnode_Default_Lit_Type is O_Cnode_Type (OC_Default_Lit); + begin + return new O_Cnode_Default_Lit_Type'(Kind => OC_Default_Lit, + Ctype => Ltype, + Ref => False); + end New_Default_Value; + function New_Sizeof (Atype : O_Tnode; Rtype : O_Tnode) return O_Cnode is subtype O_Cnode_Sizeof_Type is O_Cnode_Type (OC_Sizeof_Lit); |