<div dir="ltr"><div>You might want to take a look at the Semantic Checker. (tools/clang/lib/Sema/SemaChecking.cpp). </div><div><br></div><div>I believe the intrinsic name defaults to intrinsic var name (ie int_sqrt defaults to llvm.sqrt... since Intrinsic is llvm::Intrinsic).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 3, 2016 at 10:48 PM, Louis Li via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi there -- new to LLVM development. I'm trying to define an intrinsic function that takes a pointer to an LLVM struct type (e.g., MyStruct*).<div><div><div>def int_mynewintrinsic  : Intrinsic<[], [llvm_ptr_ty]></div></div><div><br></div><div>From what I can see in Intrinsics.td, it's only possible to specify that it takes some pointer, whose responsibility is it to enforce / how can I enforce that the pointer points to a struct of the desired type? </div><div><br></div><div>Related question: Intrinsic has the signature below, but nearly all of the functions do not define name "" -- why do some do it and some don't? (e.g., llvm.va_copy does)</div><div><br></div><div><div>class Intrinsic<list<LLVMType> ret_types,</div><div>                list<LLVMType> param_types = [],</div><div>                list<IntrinsicProperty> properties = [],</div><div>                string name = ""> : </div></div><div><br></div><div>Thanks,</div><div>Louis</div><div><br><br></div></div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank" rel="noreferrer">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>