Skip to content

Commit ec47d01

Browse files
added the new line and included space in array to pointer conversion
Signed-off-by: LekkalaSravya3 <[email protected]>
1 parent d5a9fe3 commit ec47d01

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mlir/lib/Target/Cpp/TranslateToCpp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ static LogicalResult printOperation(CppEmitter &emitter,
814814
if (failed(emitter.emitType(op.getLoc(), destArrayType.getElementType())))
815815
return failure();
816816

817-
os << "(*)"; // Pointer to array
817+
os << " (*)"; // Pointer to array
818818

819819
for (int64_t dim : destArrayType.getShape()) {
820820
os << "[" << dim << "]";

mlir/test/Target/Cpp/unrealized_conversion_cast.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// CHECK-LABEL: void builtin_cast
44
func.func @builtin_cast(%arg0: !emitc.ptr<f32>){
5-
// CHECK : float (*v2)[1][3][4][4] = (float(*)[1][3][4][4])v1
5+
// CHECK : float (*v2)[1][3][4][4] = (float (*)[1][3][4][4])v1
66
%1 = builtin.unrealized_conversion_cast %arg0 : !emitc.ptr<f32> to !emitc.array<1x3x4x4xf32>
77
return
88
}
@@ -12,4 +12,4 @@ func.func @builtin_cast_index(%arg0: !emitc.size_t){
1212
// CHECK : size_t v2 = (size_t)v1
1313
%1 = builtin.unrealized_conversion_cast %arg0 : !emitc.size_t to index
1414
return
15-
}
15+
}

0 commit comments

Comments
 (0)