diff --git a/gen/dynamiccompile.cpp b/gen/dynamiccompile.cpp index 47b4fb3cd7..5a1531c5d7 100644 --- a/gen/dynamiccompile.cpp +++ b/gen/dynamiccompile.cpp @@ -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)); diff --git a/runtime/jit-rt/cpp-so/compile.cpp b/runtime/jit-rt/cpp-so/compile.cpp index e5c6243a19..147d7f2f37 100644 --- a/runtime/jit-rt/cpp-so/compile.cpp +++ b/runtime/jit-rt/cpp-so/compile.cpp @@ -39,6 +39,7 @@ namespace { struct RtCompileFuncList { const char *name; void **func; + void *originalFunc; }; struct RtCompileSymList {