]> gcc.gnu.org Git - gcc.git/commitdiff
compiler: Unpack method names when sorting them.
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 3 Feb 2016 05:27:16 +0000 (05:27 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 3 Feb 2016 05:27:16 +0000 (05:27 +0000)
    Reviewed-on: https://go-review.googlesource.com/19177

From-SVN: r233097

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/types.cc

index 755dee5aab1995ebd912291f0657946599d0bd3f..3fb2a3e0c878e456d256e996919d131e72afe0a7 100644 (file)
@@ -1,4 +1,4 @@
-8dce33f24dd3a34e3574c1d2604428586b63c1aa
+a408bef550251926c28673818db2c64302faac1d
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 52a1e4da886f7a1e389888363f9a3bdae741fcf2..c43d0645a0f7e2850de20a97053c132080927772 100644 (file)
@@ -2307,7 +2307,10 @@ class Sort_methods
   bool
   operator()(const std::pair<std::string, const Method*>& m1,
             const std::pair<std::string, const Method*>& m2) const
-  { return m1.first < m2.first; }
+  {
+    return (Gogo::unpack_hidden_name(m1.first)
+           < Gogo::unpack_hidden_name(m2.first));
+  }
 };
 
 // Return a composite literal for the type method table for this type.
@@ -7684,7 +7687,8 @@ Interface_type::get_backend_methods(Gogo* gogo)
       mfields[i].location = loc;
 
       // Sanity check: the names should be sorted.
-      go_assert(p->name() > last_name);
+      go_assert(Gogo::unpack_hidden_name(p->name())
+               > Gogo::unpack_hidden_name(last_name));
       last_name = p->name();
     }
 
@@ -10489,7 +10493,10 @@ struct Typed_identifier_list_sort
  public:
   bool
   operator()(const Typed_identifier& t1, const Typed_identifier& t2) const
-  { return t1.name() < t2.name(); }
+  {
+    return (Gogo::unpack_hidden_name(t1.name())
+           < Gogo::unpack_hidden_name(t2.name()));
+  }
 };
 
 void
This page took 0.066733 seconds and 5 git commands to generate.