Author: Nikita Popov
Date: 2025-12-16T14:32:16+01:00
New Revision: dc69c41a96713efa105d21ae7304833e9d5567d8

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

LOG: [CGObjCGNU] Set isSigned for 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 06643d4bdc211..457e64429e370 100644
--- a/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -1826,10 +1826,12 @@ class CGObjCGNUstep2 : public CGObjCGNUstep {
     // Instance size is negative for classes that have not yet had their ivar
     // layout calculated.
     classFields.addInt(
-        LongTy, 0 - 
(Context.getASTObjCInterfaceLayout(OID->getClassInterface())
-                         .getSize()
-                         .getQuantity() -
-                     superInstanceSize));
+        LongTy,
+        0 - (Context.getASTObjCInterfaceLayout(OID->getClassInterface())
+                 .getSize()
+                 .getQuantity() -
+             superInstanceSize),
+        /*isSigned=*/true);
 
     if (classDecl->all_declared_ivar_begin() == nullptr)
       classFields.addNullPointer(PtrTy);


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

Reply via email to