Skip to content
This repository was archived by the owner on Oct 11, 2025. It is now read-only.

Commit 83405c6

Browse files
authored
[MLIR][LLVM][Flang] Move the element param of DICompositeType to the end (#156624)
This commit moves the "element" param of `DICompositeType` to the end of the parameter list. This is required as there seems to be a bug in the attribute parser that breaks a print + parse roundtrip. Related ticket: llvm/llvm-project#156623
1 parent cb513ea commit 83405c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mlir/lib/CAPI/Dialect/LLVM.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,12 @@ MlirAttribute mlirLLVMDICompositeTypeAttrGet(
197197
cast<StringAttr>(unwrap(name)), cast<DIFileAttr>(unwrap(file)), line,
198198
cast<DIScopeAttr>(unwrap(scope)), cast<DITypeAttr>(unwrap(baseType)),
199199
DIFlags(flags), sizeInBits, alignInBits,
200-
llvm::map_to_vector(unwrapList(nElements, elements, elementsStorage),
201-
[](Attribute a) { return cast<DINodeAttr>(a); }),
202200
cast<DIExpressionAttr>(unwrap(dataLocation)),
203201
cast<DIExpressionAttr>(unwrap(rank)),
204202
cast<DIExpressionAttr>(unwrap(allocated)),
205-
cast<DIExpressionAttr>(unwrap(associated))));
203+
cast<DIExpressionAttr>(unwrap(associated)),
204+
llvm::map_to_vector(unwrapList(nElements, elements, elementsStorage),
205+
[](Attribute a) { return cast<DINodeAttr>(a); })));
206206
}
207207

208208
MlirAttribute mlirLLVMDIDerivedTypeAttrGet(

0 commit comments

Comments
 (0)