================
@@ -347,7 +347,7 @@ void 
CodeGenFunction::registerGlobalDtorWithAtExit(llvm::Constant *dtorStub) {
   // extern "C" int atexit(void (*f)(void));
   assert(dtorStub->getType() ==
              llvm::PointerType::get(
-                 llvm::FunctionType::get(CGM.VoidTy, false),
+                 CGM.getLLVMContext(),
                  dtorStub->getType()->getPointerAddressSpace()) &&
          "Argument to atexit has a wrong type.");
----------------
nikic wrote:

Should just assert `->isPointerTy()` here and below.

https://github.com/llvm/llvm-project/pull/124771
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to