Commit 193833ed by Mark Mitchell

cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.

	* cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
	* method.c (use_thunk): Correct handling of vcall offsets.

From-SVN: r35064
parent 274077a4
...@@ -3101,10 +3101,10 @@ extern int flag_new_for_scope; ...@@ -3101,10 +3101,10 @@ extern int flag_new_for_scope;
`this' pointer when this function is called. */ `this' pointer when this function is called. */
#define THUNK_DELTA(DECL) (DECL_CHECK (DECL)->decl.u1.i) #define THUNK_DELTA(DECL) (DECL_CHECK (DECL)->decl.u1.i)
/* An integer indicating how many bytes should be subtracted from the /* A tree indicating how many bytes should be subtracted from the
vtable for the `this' pointer to find the vcall offset. (The vptr vtable for the `this' pointer to find the vcall offset. (The vptr
is always located at offset zero from the f `this' pointer.) If is always located at offset zero from the f `this' pointer.) If
zero, then there is no vcall offset. */ NULL, then there is no vcall offset. */
#define THUNK_VCALL_OFFSET(DECL) \ #define THUNK_VCALL_OFFSET(DECL) \
(DECL_LANG_SPECIFIC (DECL)->decl_flags.u2.vcall_offset) (DECL_LANG_SPECIFIC (DECL)->decl_flags.u2.vcall_offset)
......
...@@ -2267,7 +2267,7 @@ use_thunk (thunk_fndecl, emit_p) ...@@ -2267,7 +2267,7 @@ use_thunk (thunk_fndecl, emit_p)
t = fold (build (PLUS_EXPR, TREE_TYPE (a), a, t)); t = fold (build (PLUS_EXPR, TREE_TYPE (a), a, t));
/* If there's a vcall offset, look up that value in the vtable and /* If there's a vcall offset, look up that value in the vtable and
adjust the `this' pointer again. */ adjust the `this' pointer again. */
if (!integer_zerop (vcall_offset)) if (vcall_offset && !integer_zerop (vcall_offset))
{ {
tree orig_this; tree orig_this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment