================
@@ -4119,8 +4119,7 @@ llvm::Function *CGObjCGNU::ModuleInitFunction() {
   if (!ClassAliases.empty()) {
     llvm::Type *ArgTypes[2] = {PtrTy, PtrToInt8Ty};
     llvm::FunctionType *RegisterAliasTy =
-      llvm::FunctionType::get(Builder.getVoidTy(),
-                              ArgTypes, false);
+        llvm::FunctionType::get(BoolTy, ArgTypes, false);
----------------
Midar wrote:

This has been VoidTy for many, many years now. Because it is void in Clang, the 
ObjFW runtime declares this as void, too. Changing this to BoolTy would thus 
suddenly break ABI. (Caveat: ObjFW used to return a bool, until porting to WASM 
started, which uncovered this mismatch, at which point it has been changed to 
void. However, bool -> void is not an ABI break for most targets, but the 
opposite direction certainly is on almost every target, so it's not possible to 
go back just now.)

There is nothing in the code generated by Clang that even consumes any return 
value. Hence I suggest you just change it in the GNUstep runtime to return a 
void, to match reality.

https://github.com/llvm/llvm-project/pull/183753
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to