Author: Nikita Popov
Date: 2025-12-17T13:00:13+01:00
New Revision: 921a6471dc272667241330de1571ca6f22f03e93

URL: 
https://github.com/llvm/llvm-project/commit/921a6471dc272667241330de1571ca6f22f03e93
DIFF: 
https://github.com/llvm/llvm-project/commit/921a6471dc272667241330de1571ca6f22f03e93.diff

LOG: [CGObjCGNU] Use getSigned() for instanceSize

For non-fragile this is a negative value.

Added: 
    

Modified: 
    clang/lib/CodeGen/CGObjCGNU.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index 457e64429e370..a81c4217495c0 100644
--- a/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -3885,7 +3885,7 @@ void CGObjCGNU::GenerateClass(const 
ObjCImplementationDecl *OID) {
   // Generate the class structure
   llvm::Constant *ClassStruct = GenerateClassStructure(
       MetaClassStruct, SuperClass, 0x11L, ClassName.c_str(), nullptr,
-      llvm::ConstantInt::get(LongTy, instanceSize), IvarList, MethodList,
+      llvm::ConstantInt::getSigned(LongTy, instanceSize), IvarList, MethodList,
       GenerateProtocolList(Protocols), IvarOffsetArray, Properties,
       StrongIvarBitmap, WeakIvarBitmap);
   CGM.setGVProperties(cast<llvm::GlobalValue>(ClassStruct),


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

Reply via email to