<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 10, 2019, at 11:15, Chris Sears via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="gmail_default" style="font-size:small">Simple TableGen question, where is the definition for <i class="">CCAction</i>? It's given a forward declaration in <i class="">TargetCallingConv.td</i> alongside another forward declaration for <i class="">CallingConv</i>.</div><div class="gmail_default" style="font-size:small"><br class=""></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="gmail_default" style="font-size:small"><div class="gmail_default"><i class="">class CCAction;</i></div></div></div></div></blockquote></div></div></div></div></blockquote><div><br class=""></div><div>That's actually the whole declaration. It defines a tablegen class with no fields and is only really there to allow tablegen to type check CallingConv's argument.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="gmail_default" style="font-size:small"><div class="gmail_default"><i class="">class CallingConv;</i></div></div></div></div></blockquote><div dir="ltr" class=""><br class=""></div><div class="gmail_default" style="font-size:small">As I'd expect, <i class="">CallingConv</i> is defined later in the file:</div><div class="gmail_default" style="font-size:small"><br class=""></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="gmail_default"><i class="">class CallingConv<list<CCAction> actions> { ... }</i></div></div></div></blockquote><div dir="ltr" class=""><div dir="ltr" class=""><div class="gmail_default"></div><div class="gmail_default" style="font-size:small">But I can't find any definition for <i class="">CCAction</i> anywhere in the LLVM sources. I thought this might be idiomatically referring to an underlying C++ type but I couldn't find that either. Any explanation?</div></div></div></div></div></blockquote><div><br class=""></div><div>There's no correspondence with C++. Tablegen is essentially a database of records that the llvm-tblgen command can use to generate other files (usually C++). In this case, the code generator is in utils/TableGen/CallingConvEmitter.cpp and you'll see checks like 'Action->isSubClassOf("CCAssignToReg")' for each of CCAction's subclasses.</div><div><br class=""></div><div>Hope that helps</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="gmail_default" style="font-size:small">thanks,</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small">C</div></div></div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></body></html>