diff options
author | Arnaud Charlet <charlet@adacore.com> | 2010-09-07 16:12:09 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-09-07 18:12:09 +0200 |
commit | 4cc2a7227aa8965ce50784b13a0c87b18082fdde (patch) | |
tree | ba8a4e18517bf42370b70903afcb2f8ee1cd056c /gcc/cp/lex.c | |
parent | 86e033e21a4f61128173b4b1f4dedf07616068d7 (diff) | |
download | gcc-4cc2a7227aa8965ce50784b13a0c87b18082fdde.zip gcc-4cc2a7227aa8965ce50784b13a0c87b18082fdde.tar.gz gcc-4cc2a7227aa8965ce50784b13a0c87b18082fdde.tar.bz2 |
cp-tree.h (build_enumerator): Add new location_t parameter.
* cp-tree.h (build_enumerator): Add new location_t parameter.
(build_lang_decl_loc): New function.
* decl.c (build_enumerator): New parameter loc. Use it when calling
build_decl. Replace build_lang_decl with build_lang_decl_loc.
* pt.c (tsubst_enum): Adjust call to build_enumerator.
* parser.c (cp_parser_enumerator_definition): Ditto.
* lex.c (build_lang_decl_loc): New function.
From-SVN: r163959
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r-- | gcc/cp/lex.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 9e3b57b..0488149 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -507,13 +507,25 @@ unqualified_fn_lookup_error (tree name) return unqualified_name_lookup_error (name); } +/* Wrapper around build_lang_decl_loc(). Should gradually move to + build_lang_decl_loc() and then rename build_lang_decl_loc() back to + build_lang_decl(). */ + tree build_lang_decl (enum tree_code code, tree name, tree type) { + return build_lang_decl_loc (input_location, code, name, type); +} + +/* Build a decl from CODE, NAME, TYPE declared at LOC, and then add + DECL_LANG_SPECIFIC info to the result. */ + +tree +build_lang_decl_loc (location_t loc, enum tree_code code, tree name, tree type) +{ tree t; - t = build_decl (input_location, - code, name, type); + t = build_decl (loc, code, name, type); retrofit_lang_decl (t); return t; |