[PATCH] D47467: [IR] Begin removal of TerminatorInst by removing successor manipulation.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 29 09:52:36 PDT 2018


chandlerc added inline comments.


================
Comment at: llvm/include/llvm/IR/CFG.h:193
+
+  inline bool operator==(const Self &x) const { return Idx == x.Idx; }
+
----------------
dberris wrote:
> Maybe this should be a non-member friend, and works with const and non-const versions of compatible type?
> 
> ```
> friend inline bool operator==(const Self& L, const Self& R) {
>   return L.Idx == R.Idx;
> }
> ```
It has to be a member for the underlying iterator helper to work (due to how that underlying helper is implemented).

Is there really a problem to solve here though? Not sure what the benefit is of this in the absence of a type hierarchy... We don't do it very consistently in LLVM anywhere.


Repository:
  rL LLVM

https://reviews.llvm.org/D47467





More information about the llvm-commits mailing list