MaskRay wrote:

> The usual mechanism for emitting deferred definitions involves 
> CodeGenModule::EmitDeferred(): declarations get added to the list by 
> addDeferredDeclToEmit(), then it goes through to emit all the declarations on 
> the list. So it's a matter of making sure the resolver ends up on the list. 
> You should be able to look up the GlobalDecl from the mangled name using 
> CodeGenModule::DeferredDecls, I think?

Created https://github.com/llvm/llvm-project/pull/98832 , which shall fix the 
problem.

This problem is less about deferred emission, but a normal 
`GetOrCreateLLVMFunction` `ForDefinition` call prematurely returns due to 
`llvm::Type *ResolverTy = llvm::GlobalIFunc::getResolverFunctionType(DeclTy)` 
and `(Entry->getValueType() == Ty)`

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

Reply via email to