================
@@ -333,7 +338,8 @@ void CodeGenFunction::registerGlobalDtorWithLLVM(const 
VarDecl &VD,
                                                  llvm::FunctionCallee Dtor,
                                                  llvm::Constant *Addr) {
   // Create a function which calls the destructor.
-  llvm::Function *dtorStub = createAtExitStub(VD, Dtor, Addr);
+  llvm::Function *dtorStub =
----------------
ojhunt wrote:

Oh curses, I missed these comments due to earlier insanity this week and/or 
GitHub mail not be filtered correctly (which I'll check on)

I _think_ these casts occurred a long time ago as merge resolutions or similar.

I meant to ask about what the best solution would be, we _could_ just convert 
everything to Constant* but I looked at that and it spreads a lot.

It also means losing type system guard for is this being the right type. It 
feels like the best approach would be to introduce an wrapper type, something 
akin to 

struct ConstantMaybeSignedFunction {
   FunctionType *FT;
   Constant *Value;
};

That would allow places that do want to reason about the type to continue to do 
so. In principle this could be MaybeSigned<T> 

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

Reply via email to