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
64a57390
Commit
64a57390
authored
Oct 02, 2012
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler: Fix a couple of type reflection strings.
From-SVN: r192014
parent
e395eacb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
gcc/go/gofrontend/types.cc
+9
-3
No files found.
gcc/go/gofrontend/types.cc
View file @
64a57390
...
@@ -4919,14 +4919,15 @@ Struct_type::write_equal_function(Gogo* gogo, Named_type* name)
...
@@ -4919,14 +4919,15 @@ Struct_type::write_equal_function(Gogo* gogo, Named_type* name)
void
void
Struct_type
::
do_reflection
(
Gogo
*
gogo
,
std
::
string
*
ret
)
const
Struct_type
::
do_reflection
(
Gogo
*
gogo
,
std
::
string
*
ret
)
const
{
{
ret
->
append
(
"struct {
"
);
ret
->
append
(
"struct {"
);
for
(
Struct_field_list
::
const_iterator
p
=
this
->
fields_
->
begin
();
for
(
Struct_field_list
::
const_iterator
p
=
this
->
fields_
->
begin
();
p
!=
this
->
fields_
->
end
();
p
!=
this
->
fields_
->
end
();
++
p
)
++
p
)
{
{
if
(
p
!=
this
->
fields_
->
begin
())
if
(
p
!=
this
->
fields_
->
begin
())
ret
->
append
(
"; "
);
ret
->
push_back
(
';'
);
ret
->
push_back
(
' '
);
if
(
p
->
is_anonymous
())
if
(
p
->
is_anonymous
())
ret
->
push_back
(
'?'
);
ret
->
push_back
(
'?'
);
else
else
...
@@ -4959,7 +4960,10 @@ Struct_type::do_reflection(Gogo* gogo, std::string* ret) const
...
@@ -4959,7 +4960,10 @@ Struct_type::do_reflection(Gogo* gogo, std::string* ret) const
}
}
}
}
ret
->
append
(
" }"
);
if
(
!
this
->
fields_
->
empty
())
ret
->
push_back
(
' '
);
ret
->
push_back
(
'}'
);
}
}
// Mangled name.
// Mangled name.
...
@@ -8390,6 +8394,7 @@ Named_type::do_reflection(Gogo* gogo, std::string* ret) const
...
@@ -8390,6 +8394,7 @@ Named_type::do_reflection(Gogo* gogo, std::string* ret) const
}
}
if
(
this
->
in_function_
!=
NULL
)
if
(
this
->
in_function_
!=
NULL
)
{
{
ret
->
push_back
(
'\t'
);
ret
->
append
(
Gogo
::
unpack_hidden_name
(
this
->
in_function_
->
name
()));
ret
->
append
(
Gogo
::
unpack_hidden_name
(
this
->
in_function_
->
name
()));
ret
->
push_back
(
'$'
);
ret
->
push_back
(
'$'
);
if
(
this
->
in_function_index_
>
0
)
if
(
this
->
in_function_index_
>
0
)
...
@@ -8399,6 +8404,7 @@ Named_type::do_reflection(Gogo* gogo, std::string* ret) const
...
@@ -8399,6 +8404,7 @@ Named_type::do_reflection(Gogo* gogo, std::string* ret) const
ret
->
append
(
buf
);
ret
->
append
(
buf
);
ret
->
push_back
(
'$'
);
ret
->
push_back
(
'$'
);
}
}
ret
->
push_back
(
'\t'
);
}
}
ret
->
append
(
Gogo
::
unpack_hidden_name
(
this
->
named_object_
->
name
()));
ret
->
append
(
Gogo
::
unpack_hidden_name
(
this
->
named_object_
->
name
()));
}
}
...
...
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