+2018-09-10 Marek Polacek <polacek@redhat.com>
+
+ * class.c (build_vtbl_ref): Remove.
+ (build_vtbl_ref_1): Rename to build_vtbl_ref.
+ (build_vfn_ref): Call build_vtbl_ref instead of build_vtbl_ref_1.
+
2018-09-08 Marek Polacek <polacek@redhat.com>
PR c++/87150 - wrong ctor with maybe-rvalue semantics.
static void add_implicitly_declared_members (tree, tree*, int, int);
static tree fixed_type_or_null (tree, int *, int *);
static tree build_simple_base_path (tree expr, tree binfo);
-static tree build_vtbl_ref_1 (tree, tree);
static void build_vtbl_initializer (tree, tree, tree, tree, int *,
vec<constructor_elt, va_gc> **);
static bool check_bitfield_decl (tree);
cases for INSTANCE which we take care of here, mainly to avoid
creating extra tree nodes when we don't have to. */
-static tree
-build_vtbl_ref_1 (tree instance, tree idx)
+tree
+build_vtbl_ref (tree instance, tree idx)
{
tree aref;
tree vtbl = NULL_TREE;
return aref;
}
-tree
-build_vtbl_ref (tree instance, tree idx)
-{
- tree aref = build_vtbl_ref_1 (instance, idx);
-
- return aref;
-}
-
/* Given a stable object pointer INSTANCE_PTR, return an expression which
yields a function pointer corresponding to vtable element INDEX. */
{
tree aref;
- aref = build_vtbl_ref_1 (cp_build_fold_indirect_ref (instance_ptr),
- idx);
+ aref = build_vtbl_ref (cp_build_fold_indirect_ref (instance_ptr), idx);
/* When using function descriptors, the address of the
vtable entry is treated as a function pointer. */