[PATCH] D43680: TableGen: Generalize record types to fix typeIsConvertibleTo et al.
    Nicolai Hähnle via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sun Feb 25 08:22:56 PST 2018
    
    
  
nhaehnle marked 2 inline comments as done.
nhaehnle added a comment.
No worries :) I very much appreciate the time you're taking to go over these changes!
================
Comment at: lib/TableGen/Record.cpp:191-195
+  for (Record *R : getClasses()) {
+    if (R == Rec || R->isSubClassOf(Rec))
+      return true;
+  }
+  return false;
----------------
tra wrote:
> `return llvm::any_of(...)` ?
Good idea, done. Also changed some variable names, hope that helps.
================
Comment at: lib/TableGen/Record.cpp:206-210
+  for (Record *RHSr : RTy->getClasses()) {
+    if (!isSubClassOf(RHSr))
+      return false;
+  }
+  return true;
----------------
tra wrote:
> `return llvm::all_of(...)` ?
Done.
Repository:
  rL LLVM
https://reviews.llvm.org/D43680
    
    
More information about the llvm-commits
mailing list