From 21f01152660244c75eb21d2b9ffa104fa3543dcc Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 2 Nov 2011 20:52:18 +0000 Subject: TREE_STRING_LENGTH comment git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180800 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 4f9970b3c8c..5dc17988c07 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1521,6 +1521,7 @@ struct GTY(()) tree_fixed_cst { }; /* In a STRING_CST */ +/* In C terms, this is sizeof, not strlen. */ #define TREE_STRING_LENGTH(NODE) (STRING_CST_CHECK (NODE)->string.length) #define TREE_STRING_POINTER(NODE) \ ((const char *)(STRING_CST_CHECK (NODE)->string.str)) -- cgit v1.2.1 From 22bf03adcd87d035bbd9b581693050842a096e77 Mon Sep 17 00:00:00 2001 From: jamborm Date: Thu, 3 Nov 2011 13:53:29 +0000 Subject: 2011-11-03 Martin Jambor * ipa-prop.c (type_change_info): New fields offset, object, known_current_type and multiple_types_encountered. (extr_type_from_vtbl_ptr_store): New function. (check_stmt_for_type_change): Use it, set multiple_types_encountered if the result is different from the previous one. (detect_type_change): Renamed to detect_type_change_1. New parameter comp_type. Set up new fields in tci, build known type jump functions if the new type can be identified. (detect_type_change): New function. * tree.h (DECL_CONTEXT): Comment new use. * testsuite/g++.dg/ipa/devirt-c-1.C: Add dump scans. * testsuite/g++.dg/ipa/devirt-c-2.C: Likewise. * testsuite/g++.dg/ipa/devirt-c-7.C: New test. * testsuite/g++.dg/ipa/devirt-c-8.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180825 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 5dc17988c07..00b663726b8 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2686,7 +2686,9 @@ struct function; nodes, this points to either the FUNCTION_DECL for the containing function, the RECORD_TYPE or UNION_TYPE for the containing type, or NULL_TREE or a TRANSLATION_UNIT_DECL if the given decl has "file - scope". */ + scope". In particular, for VAR_DECLs which are virtual table pointers + (they have DECL_VIRTUAL set), we use DECL_CONTEXT to determine the type + they belong to. */ #define DECL_CONTEXT(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.context) #define DECL_FIELD_CONTEXT(NODE) \ (FIELD_DECL_CHECK (NODE)->decl_minimal.context) -- cgit v1.2.1