diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-30 17:25:42 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-30 17:25:42 +0000 |
commit | da7e5851afc8555eec1c44583d708471ea00a125 (patch) | |
tree | 4ac93946f88f9d873dc4b509f6b118ec816ee667 /gcc/cp/cp-lang.c | |
parent | 7346ca58d5775008cdbdccbf7bce39af9b5cd389 (diff) | |
download | gcc-da7e5851afc8555eec1c44583d708471ea00a125.tar.gz |
Refer to base members using COMPONENT_REFs where possible.
* class.c (build_simple_base_path): New fn.
(build_base_path): Use it for non-virtual base references.
(layout_class_type): Change base fields to their real type
after layout is done.
* cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
* cp-lang.c (cxx_get_alias_set): Use it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81349 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-lang.c')
-rw-r--r-- | gcc/cp/cp-lang.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c index bbe91707dd7..3c2a311e9ca 100644 --- a/gcc/cp/cp-lang.c +++ b/gcc/cp/cp-lang.c @@ -292,9 +292,7 @@ ok_to_generate_alias_set_for_type (tree t) static HOST_WIDE_INT cxx_get_alias_set (tree t) { - if (TREE_CODE (t) == RECORD_TYPE - && TYPE_CONTEXT (t) && CLASS_TYPE_P (TYPE_CONTEXT (t)) - && CLASSTYPE_AS_BASE (TYPE_CONTEXT (t)) == t) + if (IS_FAKE_BASE_TYPE (t)) /* The base variant of a type must be in the same alias set as the complete type. */ return get_alias_set (TYPE_CONTEXT (t)); |