[llvm] r185934 - We never compare iterators from two archives. Assert that.
Rafael Espindola
rafael.espindola at gmail.com
Tue Jul 9 05:30:10 PDT 2013
Author: rafael
Date: Tue Jul 9 07:30:10 2013
New Revision: 185934
URL: http://llvm.org/viewvc/llvm-project?rev=185934&view=rev
Log:
We never compare iterators from two archives. Assert that.
Modified:
llvm/trunk/include/llvm/Object/Archive.h
Modified: llvm/trunk/include/llvm/Object/Archive.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/Archive.h?rev=185934&r1=185933&r2=185934&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/Archive.h (original)
+++ llvm/trunk/include/llvm/Object/Archive.h Tue Jul 9 07:30:10 2013
@@ -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 {
More information about the llvm-commits
mailing list