1 // Create module flag for printf kind.
3 // RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \
4 // RUN: -o - %s | FileCheck %s -check-prefix=HOSTCALL
6 // RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \
7 // RUN: -mprintf-kind=hostcall -o - %s | FileCheck %s -check-prefix=HOSTCALL
9 // RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \
10 // RUN: -mprintf-kind=buffered -o - %s | FileCheck -check-prefix=BUFFERED %s
12 // RUN: not %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \
13 // RUN: -mprintf-kind=none -o - %s 2>&1| FileCheck %s -check-prefix=INV
15 // HOSTCALL: !{{.*}} = !{i32 1, !"amdgpu_printf_kind", !"hostcall"}
16 // BUFFERED: !{{.*}} = !{i32 1, !"amdgpu_printf_kind", !"buffered"}
17 // INV: error: invalid value 'none' in '-mprintf-kind=none'