Skip to content

Commit

Permalink
Log alloca results
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Camphausen <simon.camphausen@iml.fraunhofer.de>
  • Loading branch information
simon-camp committed Sep 18, 2024
1 parent d57006a commit 7fa0f4f
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2237,6 +2237,16 @@ class ImportOpConverter {
/*operands=*/ArrayRef<Value>{size})
.getResult(0);

builder.create<emitc::CallOpaqueOp>(
/*location=*/loc,
/*type=*/TypeRange{},
/*callee=*/"printf",
/*operands=*/ArrayRef<Value>{size, byteSpanDataVoid},
/*args=*/
builder.getArrayAttr(
{emitc::OpaqueAttr::get(ctx, "\"alloca(%d) -> %p\\n\""),
builder.getIndexAttr(0), builder.getIndexAttr(1)}));

// uint8_t *byteSpan_data = (uint8_t*)byteSpan_data_void;
Type bytePtr = emitc::PointerType::get(builder.getIntegerType(8, false));
auto byteSpanData = builder
Expand Down

0 comments on commit 7fa0f4f

Please sign in to comment.