mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-13 22:48:43 +03:00
optimize bind functions
This commit is contained in:
parent
eb211c899a
commit
0c8c8e8067
4 changed files with 141 additions and 14 deletions
|
@ -18,16 +18,25 @@
|
|||
#include "param_slice.h"
|
||||
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
|
||||
namespace llvm {
|
||||
class Constant;
|
||||
class Type;
|
||||
class Module;
|
||||
class Function;
|
||||
}
|
||||
|
||||
using BindOverride =
|
||||
llvm::Optional<llvm::function_ref<llvm::Constant*(
|
||||
llvm::Type &, const void *, size_t)>>;
|
||||
|
||||
|
||||
llvm::Function *bindParamsToFunc(
|
||||
llvm::Module &module, llvm::Function &srcFunc,llvm::Function &exampleFunc,
|
||||
const llvm::ArrayRef<ParamSlice> ¶ms,
|
||||
llvm::function_ref<void(const std::string &)> errHandler);
|
||||
llvm::function_ref<void(const std::string &)> errHandler,
|
||||
const BindOverride &override = BindOverride{});
|
||||
|
||||
#endif // BIND_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue