www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Intrinsic has incorrect return type for LLVM IR token

reply Calvin P <cloudlessapp gmail.com> writes:
https://run.dlang.io/is/kZZCEP

I try play with LLVM Intrinsic,  what is the type for LLVM IR 
token https://reviews.llvm.org/D11861
Dec 09 2020
next sibling parent Calvin P <cloudlessapp gmail.com> writes:
On Thursday, 10 December 2020 at 07:49:33 UTC, Calvin P wrote:
 https://run.dlang.io/is/kZZCEP

 I try play with LLVM Intrinsic,  what is the type for LLVM IR 
 token https://reviews.llvm.org/D11861
This type seems not exists in LDC: https://github.com/ldc-developers/ldc/blob/master/ir/irtype.cpp Maybe we can add this into LDC so D can support LLVM coroutine. like this pragma(LDC_intrinsic_type, "token") struct llvm_token; Or create a LLVM_TOKEN built-in type.
Dec 10 2020
prev sibling parent reply Guillaume Piolat <first.name guess.com> writes:
On Thursday, 10 December 2020 at 07:49:33 UTC, Calvin P wrote:
 https://run.dlang.io/is/kZZCEP

 I try play with LLVM Intrinsic,  what is the type for LLVM IR 
 token https://reviews.llvm.org/D11861
Not solving this problem in particular, but when using LDC_intrinsic you can usually get enlightned about the expected signaure by looking at the builtins list in clang source code. For your example: https://github.com/llvm/llvm-project-staging/blob/f0fd4f3af0acda5068acc5bbe10b3792c41bdfc4/clang/include/clang/Basic/Builtins.def#L1508 It seems like on this arch the return value should be voi*
Dec 10 2020
parent Calvin P <cloudlessapp gmail.com> writes:
On Thursday, 10 December 2020 at 17:43:22 UTC, Guillaume Piolat 
wrote:
 On Thursday, 10 December 2020 at 07:49:33 UTC, Calvin P wrote:
 https://run.dlang.io/is/kZZCEP

 I try play with LLVM Intrinsic,  what is the type for LLVM IR 
 token https://reviews.llvm.org/D11861
Not solving this problem in particular, but when using LDC_intrinsic you can usually get enlightned about the expected signaure by looking at the builtins list in clang source code. For your example: https://github.com/llvm/llvm-project-staging/blob/f0fd4f3af0acda5068acc5bbe10b3792c41bdfc4/clang/include/clang/Basic/Builtins.def#L1508 It seems like on this arch the return value should be voi*
Thanks for the tips, but void* not work.
Dec 12 2020