aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/gcc/ortho-lang.c
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-02-21 07:56:25 +0100
committerTristan Gingold <tgingold@free.fr>2016-03-08 06:25:52 +0100
commit77f983ae738583dfce7c3c3aaab5efde16519af0 (patch)
treed7f17de16b115bfc3ff52ad0f6b04e840800dae8 /src/ortho/gcc/ortho-lang.c
parenta7bb5f6944b410d2b02b1ae5aa9fdc10c68d7519 (diff)
downloadghdl-77f983ae738583dfce7c3c3aaab5efde16519af0.tar.gz
ghdl-77f983ae738583dfce7c3c3aaab5efde16519af0.tar.bz2
ghdl-77f983ae738583dfce7c3c3aaab5efde16519af0.zip
ortho: add new_default_value to initialize a variable.
Diffstat (limited to 'src/ortho/gcc/ortho-lang.c')
-rw-r--r--src/ortho/gcc/ortho-lang.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ortho/gcc/ortho-lang.c b/src/ortho/gcc/ortho-lang.c
index b4fdbe388..fc86d799f 100644
--- a/src/ortho/gcc/ortho-lang.c
+++ b/src/ortho/gcc/ortho-lang.c
@@ -1376,7 +1376,6 @@ finish_array_aggr (struct o_array_aggr_list *list, tree *res)
*res = build_constructor (list->atype, list->elts);
}
-
tree
new_union_aggr (tree atype, tree field, tree value)
{
@@ -1388,6 +1387,12 @@ new_union_aggr (tree atype, tree field, tree value)
}
tree
+new_default_value (tree atype)
+{
+ return build_constructor (atype, NULL);
+}
+
+tree
new_indexed_element (tree arr, tree index)
{
ortho_mark_addressable (arr);