diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-05 21:57:13 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-05 21:57:13 +0000 |
commit | 549aab72b1897b579be5f894a4fdc26083590cf7 (patch) | |
tree | 908fc4e9290a416e1c851c8683a076b5d6982f1b /gcc/langhooks.c | |
parent | 07932ea7c4fd4a2fb44e8ddabd0eef35b121ba61 (diff) | |
download | gcc-549aab72b1897b579be5f894a4fdc26083590cf7.tar.gz |
* langhooks.c (add_builtin_type): New function.
* langhooks.h (add_builtin_type): Export it.
* config/mep/mep.c (mep_init_builtins): Use it.
* config/rs6000/rs6000.c (rs6000_init_builtins): Use it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184960 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/langhooks.c')
-rw-r--r-- | gcc/langhooks.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/langhooks.c b/gcc/langhooks.c index 80efd32580d..017e024e248 100644 --- a/gcc/langhooks.c +++ b/gcc/langhooks.c @@ -605,6 +605,16 @@ lhd_builtin_function (tree decl) return decl; } +/* Create a builtin type. */ + +tree +add_builtin_type (const char *name, tree type) +{ + tree id = get_identifier (name); + tree decl = build_decl (BUILTINS_LOCATION, TYPE_DECL, id, type); + return lang_hooks.decls.pushdecl (decl); +} + /* LTO hooks. */ /* Used to save and restore any previously active section. */ |