[cfe-dev c++] Creating additional compiler intrinsics

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[cfe-dev c++] Creating additional compiler intrinsics

Manuel Klimek via cfe-dev
Hello cfe-dev list,
I am currently working on a fork of llvm to implement a paper I'm submitting to C++. The paper provides a magic standard-library function, however to implement the function, I need an intrinsic. I was looking for the steps necessary for, and some guidance towards, implementing that in clang. Specifically, it interacts with the compiler, so it would need to be a clang intrinsic, rather than an llvm intrinsic. 
The intrinsic behavior is as follows:
* In constant evaluation, emit a failing diagnostic with a string_view and source_location parameter when evaluated.
* In other contexts, same as __builtin_unreachable() (unconditional UB at runtime). 
Thank you all for your time and any help you can provide.

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev