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

connor horman via cfe-dev cfe-dev at lists.llvm.org
Wed Apr 1 06:58:02 PDT 2020

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
Thank you all for your time and any help you can provide.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200401/1fe4d789/attachment.html>

More information about the cfe-dev mailing list