aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CompilerDriver/CompilationGraph.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CompilerDriver/CompilationGraph.h')
-rw-r--r--include/llvm/CompilerDriver/CompilationGraph.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/llvm/CompilerDriver/CompilationGraph.h b/include/llvm/CompilerDriver/CompilationGraph.h
index b03f144..6bb649b 100644
--- a/include/llvm/CompilerDriver/CompilationGraph.h
+++ b/include/llvm/CompilerDriver/CompilationGraph.h
@@ -261,16 +261,19 @@ namespace llvmc {
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