================
@@ -834,8 +834,8 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType 
*BT) {
     auto *ISATy = DBuilder.createPointerType(ClassTy, Size);
 
     ObjTy = DBuilder.createStructType(TheCU, "objc_object", TheCU->getFile(), 
0,
-                                      0, 0, llvm::DINode::FlagZero, nullptr,
-                                      llvm::DINodeArray());
+                                      (uint64_t)0, 0, llvm::DINode::FlagZero,
----------------
tromey wrote:

Good question.

I chose this approach because I wanted to leave open the possibility of 
`nullptr` here meaning "no offset" -- that was mentioned as being desirable 
functionality for Objective C in the Discourse thread (but whether it's 
implemented as `nullptr` is open of course).

One fix might be to reorder the arguments in the `Metadata*` case.

This only comes up for the maybe unusual case of creating a field whose offset 
is the constant `0`.  Any existing code like this should currently get a 
message about the ambiguity -- which is why I even inserted the casts here.

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

Reply via email to