<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Jul 8, 2015 at 6:10 PM Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Jul 8, 2015, at 9:03 AM, Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:</div><br><div><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Jul 8, 2015 at 5:53 PM Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> On Jul 8, 2015, at 5:04 AM, Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br>
><br>
> Daniel pointed out this introduces a new dependency onto codegen from tools that only need to parse - was this somehow already there earlier? What does this buy us? (I'm probably missing something :)<br>
><br>
<br>
For module debugging we want to emit debug info for the data types defined by a clang module alongside the serialized clang ast when building pch/pcm files. This way we can avoid emitting tons of redundant types in the debug info of each object that was built against the module.<br>
<br>
A tool that wants to parse *and* make use of clang modules or precompiled headers produced by clang will need to link against codegen. Tools that don’t want/need clang modules, or can use a separate module cache can continue to use the RawPCHContainerOperations without introducing any extra dependency. This currently true for all of clang-tools-extra, for example.</blockquote><div><br></div><div>Thanks for explaining, that makes sense. Does debug info really need the full codegen library or only parts of it? (I have no idea how that part works ;)</div></div></div>
</div></blockquote></div><br></div><div style="word-wrap:break-word"><div>I could be possible to split out CGDebugInfo, ObjectFilePCHContainerOperations, and BackendUtil into a separate library but looking at the include list in CGDebugInfo it looks like that would also pull in CGBlocks, CGCXXABI, CGObjCRuntime, CodeGenFunction, and CodeGenModule and I think then there is not that much left.</div><div>It’s not impossible to split off a data-types-only CGDebugInfo base class to get rid of most of these dependencies, but that’s a larger project. </div></div></blockquote><div><br></div><div>Makes sense, thanks! </div></div></div>