File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,8 @@ class Object {
153153 LLVM_ABI json::Object *getObject (StringRef K);
154154 LLVM_ABI const json::Array *getArray (StringRef K) const ;
155155 LLVM_ABI json::Array *getArray (StringRef K);
156+
157+ friend bool operator ==(const Object &LHS, const Object &RHS);
156158};
157159LLVM_ABI bool operator ==(const Object &LHS, const Object &RHS);
158160inline bool operator !=(const Object &LHS, const Object &RHS) {
Original file line number Diff line number Diff line change @@ -84,16 +84,7 @@ json::Array *Object::getArray(StringRef K) {
8484 return V->getAsArray ();
8585 return nullptr ;
8686}
87- bool operator ==(const Object &LHS, const Object &RHS) {
88- if (LHS.size () != RHS.size ())
89- return false ;
90- for (const auto &L : LHS) {
91- auto R = RHS.find (L.first );
92- if (R == RHS.end () || L.second != R->second )
93- return false ;
94- }
95- return true ;
96- }
87+ bool operator ==(const Object &LHS, const Object &RHS) { return LHS.M == RHS.M ; }
9788
9889Array::Array (std::initializer_list<Value> Elements) {
9990 V.reserve (Elements.size ());
You can’t perform that action at this time.
0 commit comments