// RUN: cir-opt %s -cir-call-conv-lowering="classification-attr=test_classify" \ // RUN: | FileCheck %s // Function declarations (no body) get their signature rewritten just like // definitions: arg list is updated, return type is updated, but no body // adaptation runs. !s32i = !cir.int #ignore_first_arg = { return = { kind = "direct" }, args = [ { kind = "ignore" }, { kind = "direct" } ] } module attributes { dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry: vector<2xi64>>> } { cir.func private @ext_decl(!s32i, !s32i) -> !s32i attributes { test_classify = #ignore_first_arg } // The first argument type is dropped from the declaration's signature. // CHECK: cir.func{{.*}} @ext_decl(!s32i) -> !s32i cir.func @caller(%arg0: !s32i, %arg1: !s32i) -> !s32i attributes { test_classify = #ignore_first_arg } { %0 = cir.call @ext_decl(%arg0, %arg1) : (!s32i, !s32i) -> !s32i cir.return %0 : !s32i } // CHECK: cir.func{{.*}} @caller(%arg0: !s32i) -> !s32i // CHECK: %[[R:.*]] = cir.call @ext_decl(%arg0) : (!s32i) -> !s32i }