From 049d2def48689b21149b6a7ad19c865e1d393627 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 18 Jun 2001 07:17:53 -0400 Subject: [PATCH] tidy From-SVN: r43440 --- gcc/cp/class.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/gcc/cp/class.c b/gcc/cp/class.c index dc2b8d2d05e..013b3ba7576 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -7658,11 +7658,10 @@ dfs_accumulate_vtbl_inits (binfo, orig_binfo, rtti_binfo, t, l) 1) We are in the same place. 2) We are a primary base within a lost primary virtual base of RTTI_BINFO. - 3) We are not primary to anything else in RTTI_BINFO. */ + 3) We are primary to something not a base of RTTI_BINFO. */ tree b = BINFO_PRIMARY_BASE_OF (binfo); tree last = NULL_TREE; - tree primary = NULL_TREE; /* First, look through the bases we are primary to for RTTI_BINFO or a virtual base. */ @@ -7686,14 +7685,12 @@ dfs_accumulate_vtbl_inits (binfo, orig_binfo, rtti_binfo, t, l) if (b == rtti_binfo || (b && binfo_for_vbase (BINFO_TYPE (b), BINFO_TYPE (rtti_binfo)))) - primary = last; - /* Otherwise, this is case 3 and we get our own. */ + /* Just set our BINFO_VTABLE to point to LAST, as we may not have + set LAST's BINFO_VTABLE yet. We'll extract the actual vptr in + binfo_ctor_vtable after everything's been set up. */ + vtbl = last; - if (primary) - /* We're the primary of some binfo that we may not have - met in the inheritance graph walk of RTTI_BINFO. Just - point to it. */ - vtbl = primary; + /* Otherwise, this is case 3 and we get our own. */ } else if (!BINFO_NEW_VTABLE_MARKED (orig_binfo, BINFO_TYPE (rtti_binfo))) return inits; -- 2.30.2