LLVM  14.0.0git
Public Types | Public Member Functions | List of all members
llvm::orc::shared::MethodWrapperHandler< RetT, ClassT, ArgTs > Class Template Reference

A function object that takes an ExecutorAddr as its first argument, casts that address to a ClassT*, then calls the given method on that pointer passing in the remaining function arguments. More...

#include "llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h"

Public Types

using MethodT = RetT(ClassT::*)(ArgTs...)
 

Public Member Functions

 MethodWrapperHandler (MethodT M)
 
RetT operator() (ExecutorAddr ObjAddr, ArgTs &...Args)
 

Detailed Description

template<typename RetT, typename ClassT, typename... ArgTs>
class llvm::orc::shared::MethodWrapperHandler< RetT, ClassT, ArgTs >

A function object that takes an ExecutorAddr as its first argument, casts that address to a ClassT*, then calls the given method on that pointer passing in the remaining function arguments.

This utility removes some of the boilerplate from writing wrappers for method calls.

class MyClass {
public:
void myMethod(uint32_t, bool) { ... }
};
// SPS Method signature -- note MyClass object address as first argument.
using SPSMyMethodWrapperSignature =
SPSTuple<SPSExecutorAddr, uint32_t, bool>;
WrapperFunctionResult
myMethodCallWrapper(const char *ArgData, size_t ArgSize) {
ArgData, ArgSize, makeMethodWrapperHandler(&MyClass::myMethod));
}

Definition at line 599 of file WrapperFunctionUtils.h.

Member Typedef Documentation

◆ MethodT

template<typename RetT , typename ClassT , typename... ArgTs>
using llvm::orc::shared::MethodWrapperHandler< RetT, ClassT, ArgTs >::MethodT = RetT (ClassT::*)(ArgTs...)

Definition at line 601 of file WrapperFunctionUtils.h.

Constructor & Destructor Documentation

◆ MethodWrapperHandler()

template<typename RetT , typename ClassT , typename... ArgTs>
llvm::orc::shared::MethodWrapperHandler< RetT, ClassT, ArgTs >::MethodWrapperHandler ( MethodT  M)
inline

Definition at line 602 of file WrapperFunctionUtils.h.

References M.

Member Function Documentation

◆ operator()()

template<typename RetT , typename ClassT , typename... ArgTs>
RetT llvm::orc::shared::MethodWrapperHandler< RetT, ClassT, ArgTs >::operator() ( ExecutorAddr  ObjAddr,
ArgTs &...  Args 
)
inline

The documentation for this class was generated from the following file:
handle
then ret i32 result Tail recursion elimination should handle
Definition: README.txt:355
uint32_t
llvm::orc::shared::makeMethodWrapperHandler
MethodWrapperHandler< RetT, ClassT, ArgTs... > makeMethodWrapperHandler(RetT(ClassT::*Method)(ArgTs...))
Create a MethodWrapperHandler object from the given method pointer.
Definition: WrapperFunctionUtils.h:614