<div dir="ltr"><div>To avoid confusion, there's both a LLVM Type and a Clang Type.  The LLVM Type is used in the LLVM IR while the Clang Type represents types in a language, like C++.</div><div><br></div><div>The Clang Doxygen pages have this hierarchy, although it's truncated because Type is so large, but you can click through to get the missing nodes.  It's available at:</div><div><a href="https://clang.llvm.org/doxygen/classclang_1_1Type.html" target="_blank">https://clang.llvm.org/doxygen/classclang_1_1Type.html</a><br></div><div><br></div><div>There's also "clang/AST/TypeNode.def" which has the Type classes available as macro calls.  You define the macros, include the file, then the preprocessor will do all the work of filling in hierarchy.  You can see this in action by how Type fills up an enum:</div><div><br></div><div>class alignas(8) Type : public ExtQualsTypeCommonBase {<br>public:<br>  enum TypeClass {<br>#define TYPE(Class, Base) Class,<br>#define LAST_TYPE(Class) TypeLast = Class,<br>#define ABSTRACT_TYPE(Class, Base)<br>#include "clang/AST/TypeNodes.def"<br>    TagFirst = Record, TagLast = Enum<br>  };<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 6, 2019 at 8:15 AM Monalisa Rout via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div>Can I dump LLVM Type hierarchies somehow ??</div><div><br></div><div>Types which are declared in this file (<span style="color:rgb(0,0,0);font-family:monospace;font-size:14px">"</span><a href="https://clang.llvm.org/doxygen/Type_8h_source.html" style="color:rgb(70,101,162);font-weight:bold;font-family:monospace;font-size:14px" target="_blank">clang/AST/Type.h</a><span style="color:rgb(0,0,0);font-family:monospace;font-size:14px">"</span>  )</div><div><br></div><div>Regards,</div><div>Mona</div></div>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div></div>