From 92f7386cae3fe3cabe7300171a5dc9b4bf8b352d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 9 Jul 2013 12:30:10 +0000 Subject: [PATCH] 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 --- include/llvm/Object/Archive.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {