================ @@ -1713,25 +1713,15 @@ llvm::Function *CGOpenMPRuntime::emitThreadPrivateVarDefinition( if (!Ctor && !Dtor) return nullptr; - llvm::Type *CopyCtorTyArgs[] = {CGM.VoidPtrTy, CGM.VoidPtrTy}; - auto *CopyCtorTy = llvm::FunctionType::get(CGM.VoidPtrTy, CopyCtorTyArgs, - /*isVarArg=*/false) - ->getPointerTo(); // Copying constructor for the threadprivate variable. // Must be NULL - reserved by runtime, but currently it requires that this // parameter is always NULL. Otherwise it fires assertion. - CopyCtor = llvm::Constant::getNullValue(CopyCtorTy); + CopyCtor = llvm::Constant::getNullValue(CGM.VoidPtrTy); ---------------- nikic wrote:
```suggestion CopyCtor = llvm::Constant::getNullValue(CGM.UnqualPtrTy); ``` I don't think we should use VoidPtrTy if it's not supposed to represent a `void *`. https://github.com/llvm/llvm-project/pull/112017 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits