diff --git a/include/llvm/Analysis/DSSupport.h b/include/llvm/Analysis/DSSupport.h index 910d1cec7bd..3f680af4b2f 100644 --- a/include/llvm/Analysis/DSSupport.h +++ b/include/llvm/Analysis/DSSupport.h @@ -60,7 +60,7 @@ public: } ~DSNodeHandle() { setNode((DSNode*)0); } DSNodeHandle &operator=(const DSNodeHandle &H) { - if (&H != this) return *this; // Don't set offset to 0 if self assigning. + if (&H == this) return *this; // Don't set offset to 0 if self assigning. Offset = 0; setNode(H.getNode()); Offset = H.Offset; return *this; } diff --git a/include/llvm/Analysis/DataStructure/DSSupport.h b/include/llvm/Analysis/DataStructure/DSSupport.h index 910d1cec7bd..3f680af4b2f 100644 --- a/include/llvm/Analysis/DataStructure/DSSupport.h +++ b/include/llvm/Analysis/DataStructure/DSSupport.h @@ -60,7 +60,7 @@ public: } ~DSNodeHandle() { setNode((DSNode*)0); } DSNodeHandle &operator=(const DSNodeHandle &H) { - if (&H != this) return *this; // Don't set offset to 0 if self assigning. + if (&H == this) return *this; // Don't set offset to 0 if self assigning. Offset = 0; setNode(H.getNode()); Offset = H.Offset; return *this; }