Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

compiler, reflect: Quote package path with tabs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188548 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information...
commit bcd3f38eafae588bc9dbd0de460e6a85f9e6de57 1 parent 2802d6c
ian authored
Showing with 5 additions and 5 deletions.
  1. +4 −4 gcc/go/gofrontend/types.cc
  2. +1 −1  libgo/go/reflect/type.go
View
8 gcc/go/gofrontend/types.cc
@@ -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()
View
2  libgo/go/reflect/type.go
@@ -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]
Please sign in to comment.
Something went wrong with that request. Please try again.