<div dir="ltr"><div dir="ltr">On Tue, Apr 7, 2020 at 11:35 AM Chris Lattner <<a href="mailto:clattner@nondot.org">clattner@nondot.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">+cfe-dev.</div></blockquote><div><br></div><div>Sorry about it going to llvm-dev. I typed cfe-dev<enter> into the To: box and got llvm-dev.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div>Splitting this header up makes sense to me.  Types.h was not intended to be the 7000 line monster it is now :-). </div><div><br></div><div>Splitting QualType out to its own header makes a lot of sense to me, but would it make sense to further split it up somehow?  For example, one could split the C-like types, from the C++-like types, from the extensions.  I’m not sure if that would be useful though.</div></div></blockquote><div><br></div><div>I think that's a good idea. I think there are some key types that everyone uses (ReferenceType, PointerType, FunctionType). The Decl and Stmt class hierarchy currently often use these types from inline methods.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 7, 2020 at 10:34 AM John McCall <<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</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">How many translation units actually don’t ultimately need the type<br>
definitions?  Because this achieves nothing if almost every translation<br>
unit ends up including Type.h anyway.</blockquote><div><br></div><div>It's hard to know this without doing it. My plan was to do it, hope to get early good results, and use that to motivate finishing the project. But, my lack of results is making me reconsider the whole project.<br></div><div><br>The IWYU tool exists, but the results are generally considered unusable. We could try to run it on the codebase and see how often it thinks Type.h should be included. Part of the project is refactoring the code to not use Type.h.</div></div></div></div></div>