Displaying 1 result from an estimated 1 matches for "llvm_abstract_virtual_slot".
2018 May 03
3
RFC: virtual-like methods via LLVM-style RTTI
...tle 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, getOffspringCount)
// size_t LLVM_VIRTUAL(getOffspringCount)() const {
// retu...