aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2018-09-10 14:49:18 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2018-09-10 14:49:18 +0000
commitfe56b8a294ede183f42a9716f547db9e5ba0e085 (patch)
tree97aba224ca1ac10344375fd76b1d91b18cc84ec5 /gcc/cp
parent0fa6c49be6d60a34125f38e0d08fc0fe7d3d2174 (diff)
downloadgcc-fe56b8a294ede183f42a9716f547db9e5ba0e085.zip
gcc-fe56b8a294ede183f42a9716f547db9e5ba0e085.tar.gz
gcc-fe56b8a294ede183f42a9716f547db9e5ba0e085.tar.bz2
class.c (build_vtbl_ref): Remove.
* 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. From-SVN: r264193
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/class.c16
2 files changed, 9 insertions, 13 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 76fe61e..db5c4d3 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+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.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index e11173d..e950a74 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -133,7 +133,6 @@ static void maybe_warn_about_overly_private_class (tree);
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);
@@ -699,8 +698,8 @@ build_vfield_ref (tree datum, tree type)
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;
@@ -730,14 +729,6 @@ build_vtbl_ref_1 (tree instance, tree idx)
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. */
@@ -746,8 +737,7 @@ build_vfn_ref (tree instance_ptr, tree idx)
{
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. */