llvm-project
327c64cd - [HIP][SPIRV] Implicit `new`/`delete` should be `cdecl` on host (#152023)

Commit
141 days ago
[HIP][SPIRV] Implicit `new`/`delete` should be `cdecl` on host (#152023) Client apps can (and in the case of the MSVC STL do) set cdecl explicitly on `new` / `delete` implementations. On the other hand, Clang generates implicit decls with the target's default CC. This is problematic for SPIR-V, since the default there is spir_function, which is not compatible. Since we cannot change pre-existing headers / implementations, this patch sets the CC to C for the implicit host-side decls, when compiling for device, to prevent the conflict. This is fine because the host-side overloards do not get emitted on device.
Author
Parents
Loading