@@ -193,8 +193,7 @@ class GenericLLVMIRPlatformSupport : public LLJIT::PlatformSupport {
193193 {PlatformInstanceDecl, DSOHandle});
194194
195195 auto *IntTy = Type::getIntNTy (*Ctx, sizeof (int ) * CHAR_BIT);
196- auto *AtExitCallbackTy = FunctionType::get (VoidTy, {}, false );
197- auto *AtExitCallbackPtrTy = PointerType::getUnqual (AtExitCallbackTy);
196+ auto *AtExitCallbackPtrTy = PointerType::getUnqual (*Ctx);
198197 auto *AtExit = addHelperAndWrapper (
199198 *M, " atexit" , FunctionType::get (IntTy, {AtExitCallbackPtrTy}, false ),
200199 GlobalValue::HiddenVisibility, " __lljit.atexit_helper" ,
@@ -468,12 +467,9 @@ class GenericLLVMIRPlatformSupport : public LLJIT::PlatformSupport {
468467 *M, GenericIRPlatformSupportTy, true , GlobalValue::ExternalLinkage,
469468 nullptr , " __lljit.platform_support_instance" );
470469
471- auto *Int8Ty = Type::getInt8Ty (*Ctx);
472470 auto *IntTy = Type::getIntNTy (*Ctx, sizeof (int ) * CHAR_BIT);
473- auto *VoidTy = Type::getVoidTy (*Ctx);
474- auto *BytePtrTy = PointerType::getUnqual (Int8Ty);
475- auto *CxaAtExitCallbackTy = FunctionType::get (VoidTy, {BytePtrTy}, false );
476- auto *CxaAtExitCallbackPtrTy = PointerType::getUnqual (CxaAtExitCallbackTy);
471+ auto *BytePtrTy = PointerType::getUnqual (*Ctx);
472+ auto *CxaAtExitCallbackPtrTy = PointerType::getUnqual (*Ctx);
477473
478474 auto *CxaAtExit = addHelperAndWrapper (
479475 *M, " __cxa_atexit" ,
0 commit comments