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
c789c045
Commit
c789c045
authored
12 years ago
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler, reflect: Quote package path with tabs.
From-SVN: r188548
parent
d71ec0cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
gcc/go/gofrontend/types.cc
+4
-4
libgo/go/reflect/type.go
+1
-1
No files found.
gcc/go/gofrontend/types.cc
View file @
c789c045
...
...
@@ -8340,16 +8340,16 @@ Named_type::do_reflection(Gogo* gogo, std::string* ret) const
// -fgo-pkgpath was introduced. When -fgo-pkgpath is specified,
// we use it to make a unique reflection string, so that the
// type canonicalization in the reflect package will work. In
// order to be compatible with the gc compiler, we
quote the
// package path, so that the reflect methods can discard it.
// order to be compatible with the gc compiler, we
put tabs into
//
the
package path, so that the reflect methods can discard it.
const
Package
*
package
=
this
->
named_object_
->
package
();
if
(
gogo
->
pkgpath_from_option
())
{
ret
->
push_back
(
'
"
'
);
ret
->
push_back
(
'
\t
'
);
ret
->
append
(
package
!=
NULL
?
package
->
pkgpath_symbol
()
:
gogo
->
pkgpath_symbol
());
ret
->
push_back
(
'
"
'
);
ret
->
push_back
(
'
\t
'
);
}
ret
->
append
(
package
!=
NULL
?
package
->
package_name
()
...
...
This diff is collapsed.
Click to expand it.
libgo/go/reflect/type.go
View file @
c789c045
...
...
@@ -444,7 +444,7 @@ func (t *commonType) String() string {
r
:=
make
([]
byte
,
len
(
s
))
j
:=
0
for
i
:=
0
;
i
<
len
(
s
);
i
++
{
if
s
[
i
]
==
'
"
'
{
if
s
[
i
]
==
'
\t
'
{
q
=
!
q
}
else
if
!
q
{
r
[
j
]
=
s
[
i
]
...
...
This diff is collapsed.
Click to expand it.
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