mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-13 02:21:45 +00:00
9b7763821a
https://reviews.llvm.org/D158247 caused regressions for HIP on Windows and was reverted. A reduced test case is: ``` typedef void (__stdcall* funcTy)(); void invoke(funcTy f); static void __stdcall callee() noexcept { } void foo() { invoke(callee); } ``` It is due to clang missing handling host/device attributes for calling convention at a few places This patch fixes that.
18 lines
453 B
Plaintext
18 lines
453 B
Plaintext
// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple \
|
|
// RUN: x86_64-pc-windows-msvc -fms-compatibility -fcuda-is-device \
|
|
// RUN: -fsyntax-only -verify -x hip %s
|
|
// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fms-compatibility \
|
|
// RUN: -fsyntax-only -verify -x hip %s
|
|
|
|
// expected-no-diagnostics
|
|
|
|
typedef void (__stdcall* funcTy)();
|
|
void invoke(funcTy f);
|
|
|
|
static void __stdcall callee() noexcept {
|
|
}
|
|
|
|
void foo() {
|
|
invoke(callee);
|
|
}
|