summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/langhooks.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2002-09-01 20:38:57 +0000
committerkan <kan@FreeBSD.org>2002-09-01 20:38:57 +0000
commit2e25f3a6c57335cba50111faceb0ce2ab59e9bcb (patch)
treec6857d31c36dbd89a881b0229bf38b062797d413 /contrib/gcc/langhooks.c
parent0895e1acb698e05d503c26bec5471de2e88b7d93 (diff)
downloadFreeBSD-src-2e25f3a6c57335cba50111faceb0ce2ab59e9bcb.zip
FreeBSD-src-2e25f3a6c57335cba50111faceb0ce2ab59e9bcb.tar.gz
Gcc 3.2.1-prerelease from the FSF anoncvs repo gcc-3_2-branch on 1-Sep-2002 00:00:01 EDT.
Diffstat (limited to 'contrib/gcc/langhooks.c')
-rw-r--r--contrib/gcc/langhooks.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/gcc/langhooks.c b/contrib/gcc/langhooks.c
index c0ee16c..e50ebc9 100644
--- a/contrib/gcc/langhooks.c
+++ b/contrib/gcc/langhooks.c
@@ -303,3 +303,16 @@ lhd_tree_dump_type_quals (t)
return TYPE_QUALS (t);
}
+/* lang_hooks.expr_size: Determine the size of the value of an expression T
+ in a language-specific way. Returns a tree for the size in bytes. */
+
+tree
+lhd_expr_size (exp)
+ tree exp;
+{
+ if (TREE_CODE_CLASS (TREE_CODE (exp)) == 'd'
+ && DECL_SIZE_UNIT (exp) != 0)
+ return DECL_SIZE_UNIT (exp);
+ else
+ return size_in_bytes (TREE_TYPE (exp));
+}
OpenPOWER on IntegriCloud