================
@@ -532,16 +588,25 @@ mlir::Type adjustGlobalTypeForInit(mlir::Type llvmType, 
mlir::Attribute init,
   // Structs can have a flexible array member, adjust that.
   if (mlir::isa<cir::StructType>(constRecord.getType()))
     return adjustGlobalStructTypeForInit(structTy, constRecord, converter,
-                                         dataLayout);
+                                         dataLayout, paddingAddedIndexes);
   if (mlir::isa<cir::UnionType>(constRecord.getType()))
     return adjustGlobalUnionTypeForInit(structTy, constRecord, converter,
                                         dataLayout);
   return llvmType;
 }
 
+mlir::Type adjustGlobalTypeForInit(mlir::Type llvmType, mlir::Attribute init,
+                                   const mlir::TypeConverter &converter,
+                                   const mlir::DataLayout &dataLayout) {
+  llvm::SmallVector<unsigned> ignoredAddedIndexes;
+  return adjustGlobalTypeForInit(llvmType, init, converter, dataLayout,
+                                 ignoredAddedIndexes);
----------------
andykaylor wrote:

Can you assert that `ignoredAddedIndexes` is empty on return here? Or is it OK 
for indexes to have been added on this call path?

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

Reply via email to