search for: _virtualbody_

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

2018 May 03
3
RFC: virtual-like methods via LLVM-style RTTI
...ringCount) // size_t LLVM_VIRTUAL(getOffspringCount)() const { // ... // } // }; #define LLVM_VIRTUAL_THUNK(Ty, BaseTy, Method) \ template <typename... Args> \ static auto _virtual_##Method(BaseTy *b, Args... args) -> auto { \ return static_cast<Ty*>(b) \ ->_virtualbody_##Method(std::forward<Args>(args)...); \ } #define LLVM_VIRTUAL(Method) \ __attribute__((always_inline)) _virtualbody_##Method #define LLVM_ABSTRACT_VIRTUAL(BaseTy, Method) \ __attribute__((noreturn)) \ LLVM_VIRTUAL(Method)(...) { \ llvm_unreachable("Unhandled LLVM-virtual m...