@@ -9356,11 +9356,11 @@ fn ccAbiPromoteInt(
93569356 return null ;
93579357}
93589358
9359+ /// This is the one source of truth for whether a type is passed around as an LLVM pointer,
9360+ /// or as an LLVM value.
93599361fn isByRef (ty : Type ) bool {
93609362 // For tuples and structs, if there are more than this many non-void
93619363 // fields, then we make it byref, otherwise byval.
9362- // TODO we actually want to set this to 2, however it is tripping an LLVM 14 regression:
9363- // https://github.com/llvm/llvm-project/issues/56585
93649364 const max_fields_byval = 0 ;
93659365
93669366 switch (ty .zigTypeTag ()) {
@@ -9421,10 +9421,6 @@ fn isByRef(ty: Type) bool {
94219421 return false ;
94229422 }
94239423 return true ;
9424- // TODO we actually want this logic:
9425- // however it is tripping an LLVM 14 regression:
9426- // https://github.com/llvm/llvm-project/issues/56585
9427- //return isByRef(payload_ty);
94289424 },
94299425 .Optional = > {
94309426 var buf : Type.Payload.ElemType = undefined ;
@@ -9436,10 +9432,6 @@ fn isByRef(ty: Type) bool {
94369432 return false ;
94379433 }
94389434 return true ;
9439- // TODO we actually want this logic:
9440- // however it is tripping an LLVM 14 regression:
9441- // https://github.com/llvm/llvm-project/issues/56585
9442- //return isByRef(payload_ty);
94439435 },
94449436 }
94459437}
0 commit comments