search for: llvm_abstract_virtual_begin

Displaying 1 result from an estimated 1 matches for "llvm_abstract_virtual_begin".

2018 May 03
3
RFC: virtual-like methods via LLVM-style RTTI
...(int howLoud) { /* normal body */ } // // For base classes, one must do a little more work. The simplest case is an // abstract virtual method in a type called 'Base': // // void LLVM_ABSTRACT_VIRTUAL(BaseTy, makeSound) // // And then later in the header file, the vtable definition: // // LLVM_ABSTRACT_VIRTUAL_BEGIN(BaseTy, makeSound) // #define BASE_NODE(Ty, ...) LLVM_ABSTRACT_VIRTUAL_SLOT(Ty, makeSound) // #include <BaseTy.inc> // LLVM_ABSTRACT_VIRTUAL_END(getKind()) // // // Example: // // class Cat { // ... // // void LLVM_ABSTRACT_VIRTUAL(Base, makeSound) // // LLVM_BASE_VIRTUAL(Base, getOffsp...