From: Rafael Espindola Date: Tue, 9 Jul 2013 12:30:10 +0000 (+0000) Subject: We never compare iterators from two archives. Assert that. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=92f7386cae3fe3cabe7300171a5dc9b4bf8b352d;p=oota-llvm.git We never compare iterators from two archives. Assert that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185934 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Object/Archive.h b/include/llvm/Object/Archive.h index 0cd1867b73c..198491c3769 100644 --- a/include/llvm/Object/Archive.h +++ b/include/llvm/Object/Archive.h @@ -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 {