diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-11-20 16:02:55 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@linaro.org> | 2017-11-20 16:02:55 +0000 |
commit | d58952aefb03632bbb5b441d5c0bd330711f0af1 (patch) | |
tree | d046e56bfbd6a40106ae6ab96fafc954f1dfc955 /gcc/cp/rtti.c | |
parent | 648f8fc59b2cc39abd24f4c22388b346cdebcc31 (diff) | |
parent | 50221fae802a10fafe95e61d40504a58da33e98f (diff) | |
download | gcc-linaro-dev/sve.tar.gz |
Merge trunk into svelinaro-dev/sve
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r-- | gcc/cp/rtti.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index 10ecbfd9589..b158507d7a8 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -206,8 +206,7 @@ build_headof (tree exp) index = build_int_cst (NULL_TREE, -2 * TARGET_VTABLE_DATA_ENTRY_DISTANCE); - offset = build_vtbl_ref (cp_build_indirect_ref (exp, RO_NULL, - tf_warning_or_error), + offset = build_vtbl_ref (cp_build_fold_indirect_ref (exp), index); type = cp_build_qualified_type (ptr_type_node, @@ -303,7 +302,7 @@ get_tinfo_decl_dynamic (tree exp, tsubst_flags_t complain) /* Otherwise return the type_info for the static type of the expr. */ t = get_tinfo_ptr (TYPE_MAIN_VARIANT (type)); - return cp_build_indirect_ref (t, RO_NULL, complain); + return cp_build_fold_indirect_ref (t); } static bool @@ -365,7 +364,7 @@ build_typeid (tree exp, tsubst_flags_t complain) exp = cp_build_addr_expr (exp, complain); exp = save_expr (exp); cond = cp_convert (boolean_type_node, exp, complain); - exp = cp_build_indirect_ref (exp, RO_NULL, complain); + exp = cp_build_fold_indirect_ref (exp); } exp = get_tinfo_decl_dynamic (exp, complain); @@ -529,7 +528,7 @@ get_typeid (tree type, tsubst_flags_t complain) if (!type) return error_mark_node; - return cp_build_indirect_ref (get_tinfo_ptr (type), RO_NULL, complain); + return cp_build_fold_indirect_ref (get_tinfo_ptr (type)); } /* Check whether TEST is null before returning RESULT. If TEST is used in |