1 // RUN: %clang_cc1 -emit-llvm -o - -triple arm-arm-none-eabi -fallow-half-arguments-and-returns %s | FileCheck %s
2 // RUN: %clang_cc1 -emit-llvm -o - -triple aarch64-arm-none-eabi -fallow-half-arguments-and-returns %s | FileCheck %s
3 
4 // Test name-mangling of __fp16 passed directly as a function argument
5 // (when that is permitted).
6 
7 // CHECK: define {{.*}}void @_Z13fp16_argumentDh(half %{{.*}})
fp16_argument(__fp16 arg)8 void fp16_argument(__fp16 arg) {}
9 
10 // Test name-mangling of __fp16 as a return type. The return type of
11 // fp16_return itself isn't mentioned in the mangled name, so to test
12 // this, we have to pass it a function pointer and make __fp16 the
13 // return type of that.
14 
15 // CHECK: define {{.*}}void @_Z11fp16_returnPFDhvE(half ()* %{{.*}})
fp16_return(__fp16 (* func)(void))16 void fp16_return(__fp16 (*func)(void)) {}
17