mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-09 04:15:58 +03:00
store thunk func ptr in jit metadata
This commit is contained in:
parent
bdc5f65070
commit
a27d6492c3
2 changed files with 4 additions and 0 deletions
|
@ -457,12 +457,14 @@ llvm::StructType *getSymListElemType(llvm::LLVMContext &context) {
|
|||
// {
|
||||
// i8* name;
|
||||
// i8* func;
|
||||
// i8* originalFunc;
|
||||
// };
|
||||
|
||||
llvm::StructType *getFuncListElemType(llvm::LLVMContext &context) {
|
||||
llvm::Type *elements[] = {
|
||||
llvm::IntegerType::getInt8PtrTy(context),
|
||||
llvm::IntegerType::getInt8PtrTy(context),
|
||||
llvm::IntegerType::getInt8PtrTy(context),
|
||||
};
|
||||
return llvm::StructType::create(context, elements, /*"RtCompileFuncList"*/ "",
|
||||
true);
|
||||
|
@ -534,6 +536,7 @@ generateFuncList(IRState *irs, const Types &types) {
|
|||
llvm::Constant *fields[] = {
|
||||
createStringInitializer(irs->module, name),
|
||||
getI8Ptr(it.second.thunkVar),
|
||||
getI8Ptr(it.second.thunkFunc),
|
||||
};
|
||||
elements.push_back(
|
||||
llvm::ConstantStruct::get(types.funcListElemType, fields));
|
||||
|
|
|
@ -39,6 +39,7 @@ namespace {
|
|||
struct RtCompileFuncList {
|
||||
const char *name;
|
||||
void **func;
|
||||
void *originalFunc;
|
||||
};
|
||||
|
||||
struct RtCompileSymList {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue