18 lines · plain
1// Create module flag for printf kind.2 3// RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \4// RUN: -o - %s | FileCheck %s -check-prefix=HOSTCALL5 6// RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \7// RUN: -mprintf-kind=hostcall -o - %s | FileCheck %s -check-prefix=HOSTCALL8 9// RUN: %clang_cc1 -fcuda-is-device -triple amdgcn-amd-amdhsa -emit-llvm \10// RUN: -mprintf-kind=buffered -o - %s | FileCheck -check-prefix=BUFFERED %s11 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=INV14 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'18