From 1b28d441b282bb7545664ee90d182ab610ed50e7 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Fri, 27 Apr 2001 05:08:39 +0000 Subject: [PATCH] method.c (use_thunk): Make sure that thunks really are emitted when requested. * method.c (use_thunk): Make sure that thunks really are emitted when requested. From-SVN: r41621 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/method.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d6c2f48853c9..c6e06acbf240 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-04-26 Mark Mitchell + + * method.c (use_thunk): Make sure that thunks really are emitted + when requested. + 2001-04-26 Nathan Sidwell * mangle.c (write_chars): New macro. diff --git a/gcc/cp/method.c b/gcc/cp/method.c index e3c88a4616d6..db45fd4ec169 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -377,7 +377,8 @@ make_thunk (function, delta, vcall_index, generate_with_vtable_p) return thunk; } -/* Emit the definition of a C++ multiple inheritance vtable thunk. */ +/* Emit the definition of a C++ multiple inheritance vtable thunk. If + EMIT_P is non-zero, the thunk is emitted immediately. */ void use_thunk (thunk_fndecl, emit_p) @@ -519,6 +520,11 @@ use_thunk (thunk_fndecl, emit_p) DECL_INITIAL (thunk_fndecl) = make_node (BLOCK); BLOCK_VARS (DECL_INITIAL (thunk_fndecl)) = DECL_ARGUMENTS (thunk_fndecl); + + /* Since we want to emit the thunk, we explicitly mark its name as + referenced. */ + TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (thunk_fndecl)) = 1; + expand_body (finish_function (0)); } -- 2.43.5