<div dir="ltr">What I'm getting at is that, assuming my understanding is correct, something like an adapter could be created that each plugin could implement.  Say you've got a DebugInfoAdapter interface with DebugInfoDwarf, etc implementations.  Then ClangASTContext could just use this.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 27, 2015 at 2:18 PM <<a href="mailto:dawn@burble.org">dawn@burble.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Aug 27, 2015 at 09:12:06PM +0000, Zachary Turner wrote:<br>
> If I'm following this discussion correctly, Greg are you saying that<br>
> ClangASTContext could be renamed to DwarfASTContext?  And that for other<br>
> types of Debug info we could have PascalASTContext and PdbASTContext?<br>
><br>
> If that's the case, then it seems there is a lot of code inside of<br>
> ClangASTContext (aka DwarfASTContext) which is not specific to DWARF, and<br>
> there's no reason that other ASTContext classes shouldn't be able to reuse<br>
> it.<br>
<br>
Renaming and reusing the ClangASTContext code would help but it's not<br>
enough - the DWARF code belongs in the DWARF plugin.  Plugins should be<br>
just that - pluggable!  :)<br>
</blockquote></div>