nhaehnle added a comment. In D83088#2213802 <https://reviews.llvm.org/D83088#2213802>, @dblaikie wrote:
> In D83088#2213797 <https://reviews.llvm.org/D83088#2213797>, @nhaehnle wrote: > >> In D83088#2208611 <https://reviews.llvm.org/D83088#2208611>, @dblaikie wrote: >> >>> This seems like a strange hybrid between a static-polymorphism (with >>> traits) and dynamic polymorphism (with base classes/virtual functions). >>> Could this more readily be just one or the other? (sounds like you're >>> leaning towards dynamic polymorphism) >> >> No, it's very much this way on purpose. The idea is to support the same set >> of functionality as much as possible in both static **and** dynamic >> polymorphism. > > Could it be implemented statically as a primary interface, with a dynamic > wrapper? (eg: a base class, then a derived class template that takes the > static CFG type to wrap into the dynamic type) keeping the two concepts more > clearly separated? That is how it is implemented. CfgTraits is the primary static interface, and then CfgInterface / CfgInterfaceImpl is the dynamic wrapper. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83088/new/ https://reviews.llvm.org/D83088 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits