OSDN Git Service

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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185934 91177308-0d34-0410-b5e6-96231b3b80d8

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 {