]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add equality operator for identifiers
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Sat, 5 Apr 2025 23:43:20 +0000 (01:43 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 28 Apr 2025 14:18:56 +0000 (16:18 +0200)
gcc/rust/ChangeLog:

* ast/rust-ast.h: Add equality operator.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast.h

index 55f178d782c3514d40879b89627363365ae30b6e..94585dc134427744a9f7cc62070bcb01ae9c94f1 100644 (file)
@@ -57,6 +57,11 @@ public:
 
   bool empty () const { return ident.empty (); }
 
+  bool operator== (const Identifier &other) const
+  {
+    return ident == other.ident;
+  }
+
 private:
   std::string ident;
   location_t loc;