[PATCH] D43680: TableGen: Generalize record types to fix typeIsConvertibleTo et al.
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 15:54:15 PST 2018
tra added a comment.
My brain is fried by now. I'll get back to this patch on Monday.
================
Comment at: lib/TableGen/Record.cpp:191-195
+ for (Record *R : getClasses()) {
+ if (R == Rec || R->isSubClassOf(Rec))
+ return true;
+ }
+ return false;
----------------
`return llvm::any_of(...)` ?
================
Comment at: lib/TableGen/Record.cpp:206-210
+ for (Record *RHSr : RTy->getClasses()) {
+ if (!isSubClassOf(RHSr))
+ return false;
+ }
+ return true;
----------------
`return llvm::all_of(...)` ?
Repository:
rL LLVM
https://reviews.llvm.org/D43680
More information about the llvm-commits
mailing list