We never compare iterators from two archives. Assert that.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 9 Jul 2013 12:30:10 +0000 (12:30 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 9 Jul 2013 12:30:10 +0000 (12:30 +0000)
llvm-svn: 185934

llvm/include/llvm/Object/Archive.h

index 0cd1867..198491c 100644 (file)
@@ -54,7 +54,8 @@ public:
     Child(const Archive *Parent, const char *Start);
 
     bool operator ==(const Child &other) const {
-      return (Parent == other.Parent) && (Data.begin() == other.Data.begin());
+      assert(Parent == other.Parent);
+      return Data.begin() == other.Data.begin();
     }
 
     bool operator <(const Child &other) const {