[clang] [CodeGen] Replace of PointerType::get(Type) with opaque version (NFC) (PR #124771)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 8 00:47:39 PST 2025


================
@@ -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


More information about the cfe-commits mailing list