From 5f7ecc80225f5eaa6bac52facde7d9e310c0281c Mon Sep 17 00:00:00 2001 From: Robert Konicar Date: Thu, 9 Nov 2023 13:25:13 +0100 Subject: [PATCH] test: Add test for lowering of using a typedefed function argument. --- test/vast/Transform/HL/ResolveTypedefs/func-b.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/vast/Transform/HL/ResolveTypedefs/func-b.c diff --git a/test/vast/Transform/HL/ResolveTypedefs/func-b.c b/test/vast/Transform/HL/ResolveTypedefs/func-b.c new file mode 100644 index 0000000000..7667554e93 --- /dev/null +++ b/test/vast/Transform/HL/ResolveTypedefs/func-b.c @@ -0,0 +1,8 @@ +// RUN: %vast-front -vast-emit-mlir=hl %s -o - | %vast-opt --vast-hl-lower-typedefs | %file-check %s +typedef int INT; + +// CHECK: hl.func @fn ([[A1:%arg[0-9]+]]: !hl.lvalue) -> !hl.int +int fn(INT x) { + // CHECK: hl.ref [[A1]] : (!hl.lvalue) -> !hl.lvalue + return x; +}