Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
d7981fd9
Commit
d7981fd9
authored
May 18, 2004
by
Jason Merrill
Committed by
Jason Merrill
May 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* class.c (build_base_path): Tidy a bit.
From-SVN: r82004
parent
c9e66eda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
gcc/cp/ChangeLog
+4
-0
gcc/cp/class.c
+11
-7
No files found.
gcc/cp/ChangeLog
View file @
d7981fd9
2004-05-18 Jason Merrill <jason@redhat.com>
* class.c (build_base_path): Tidy a bit.
2004-05-14 Geoffrey Keating <geoffk@apple.com>
2004-05-14 Geoffrey Keating <geoffk@apple.com>
* name-lookup.c (struct scope_binding): New.
* name-lookup.c (struct scope_binding): New.
...
...
gcc/cp/class.c
View file @
d7981fd9
...
@@ -255,6 +255,7 @@ build_base_path (enum tree_code code,
...
@@ -255,6 +255,7 @@ build_base_path (enum tree_code code,
int
fixed_type_p
;
int
fixed_type_p
;
int
want_pointer
=
TREE_CODE
(
TREE_TYPE
(
expr
))
==
POINTER_TYPE
;
int
want_pointer
=
TREE_CODE
(
TREE_TYPE
(
expr
))
==
POINTER_TYPE
;
bool
has_empty
=
false
;
bool
has_empty
=
false
;
bool
virtual_access
;
if
(
expr
==
error_mark_node
||
binfo
==
error_mark_node
||
!
binfo
)
if
(
expr
==
error_mark_node
||
binfo
==
error_mark_node
||
!
binfo
)
return
error_mark_node
;
return
error_mark_node
;
...
@@ -296,21 +297,24 @@ build_base_path (enum tree_code code,
...
@@ -296,21 +297,24 @@ build_base_path (enum tree_code code,
offset
=
BINFO_OFFSET
(
binfo
);
offset
=
BINFO_OFFSET
(
binfo
);
fixed_type_p
=
resolves_to_fixed_type_p
(
expr
,
&
nonnull
);
fixed_type_p
=
resolves_to_fixed_type_p
(
expr
,
&
nonnull
);
if
(
want_pointer
&&
!
nonnull
/* Do we need to look in the vtable for the real offset? */
&&
(
!
integer_zerop
(
offset
)
||
(
v_binfo
&&
fixed_type_p
<=
0
)))
virtual_access
=
(
v_binfo
&&
fixed_type_p
<=
0
);
/* Do we need to check for a null pointer? */
if
(
want_pointer
&&
!
nonnull
&&
(
virtual_access
||
!
integer_zerop
(
offset
)))
null_test
=
error_mark_node
;
null_test
=
error_mark_node
;
if
(
TREE_SIDE_EFFECTS
(
expr
)
/* Protect against multiple evaluation if necessary. */
&&
(
null_test
||
(
v_binfo
&&
fixed_type_p
<=
0
)
))
if
(
TREE_SIDE_EFFECTS
(
expr
)
&&
(
null_test
||
virtual_access
))
expr
=
save_expr
(
expr
);
expr
=
save_expr
(
expr
);
/* Now that we've saved expr, build the real null test. */
if
(
null_test
)
if
(
null_test
)
null_test
=
fold
(
build2
(
NE_EXPR
,
boolean_type_node
,
null_test
=
fold
(
build2
(
NE_EXPR
,
boolean_type_node
,
expr
,
integer_zero_node
));
expr
,
integer_zero_node
));
/* If this is a simple base reference, express it as a COMPONENT_REF. */
/* If this is a simple base reference, express it as a COMPONENT_REF. */
if
(
code
==
PLUS_EXPR
if
(
code
==
PLUS_EXPR
&&
!
virtual_access
&&
(
v_binfo
==
NULL_TREE
||
fixed_type_p
>
0
)
/* We don't build base fields for empty bases, and they aren't very
/* We don't build base fields for empty bases, and they aren't very
interesting to the optimizers anyway. */
interesting to the optimizers anyway. */
&&
!
has_empty
)
&&
!
has_empty
)
...
@@ -323,7 +327,7 @@ build_base_path (enum tree_code code,
...
@@ -323,7 +327,7 @@ build_base_path (enum tree_code code,
goto
out
;
goto
out
;
}
}
if
(
v
_binfo
&&
fixed_type_p
<=
0
)
if
(
v
irtual_access
)
{
{
/* Going via virtual base V_BINFO. We need the static offset
/* Going via virtual base V_BINFO. We need the static offset
from V_BINFO to BINFO, and the dynamic offset from D_BINFO to
from V_BINFO to BINFO, and the dynamic offset from D_BINFO to
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment