[llvm-commits] [llvm] r66347 - /llvm/trunk/include/llvm/CompilerDriver/CompilationGraph.h
Mikhail Glushenkov
foldr at codedgers.com
Sat Mar 7 12:18:46 PST 2009
Author: foldr
Date: Sat Mar 7 14:18:46 2009
New Revision: 66347
URL: http://llvm.org/viewvc/llvm-project?rev=66347&view=rev
Log:
Remove some duplication.
Modified:
llvm/trunk/include/llvm/CompilerDriver/CompilationGraph.h
Modified: llvm/trunk/include/llvm/CompilerDriver/CompilationGraph.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CompilerDriver/CompilationGraph.h?rev=66347&r1=66346&r2=66347&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CompilerDriver/CompilationGraph.h (original)
+++ llvm/trunk/include/llvm/CompilerDriver/CompilationGraph.h Sat Mar 7 14:18:46 2009
@@ -261,16 +261,19 @@
return *this;
}
- inline bool operator==(const ThisType& I) const
- { return EdgeIter == I.EdgeIter; }
- inline bool operator!=(const ThisType& I) const
- { return EdgeIter != I.EdgeIter; }
+ inline bool operator==(const ThisType& I) const {
+ assert(OwningGraph == I.OwningGraph);
+ return EdgeIter == I.EdgeIter;
+ }
+ inline bool operator!=(const ThisType& I) const {
+ return !this->operator==(I);
+ }
inline pointer operator*() const {
return &OwningGraph->getNode((*EdgeIter)->ToolName());
}
inline pointer operator->() const {
- return &OwningGraph->getNode((*EdgeIter)->ToolName());
+ return this->operator*();
}
ThisType& operator++() { ++EdgeIter; return *this; } // Preincrement
More information about the llvm-commits
mailing list