<div dir="ltr"><div style>Looks good.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 3, 2013 at 11:16 AM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ping?<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, May 29, 2013 at 4:18 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br>
> On Wed, May 29, 2013 at 4:15 PM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>
>> On Wed, May 29, 2013 at 3:55 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>><br>
>> wrote:<br>
>>><br>
>>> On Wed, May 29, 2013 at 3:31 PM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>
>>> > --- include/clang/AST/ASTConsumer.h (revision 182601)<br>
>>> > +++ include/clang/AST/ASTConsumer.h (working copy)<br>
>>> > @@ -92,6 +92,12 @@<br>
>>> > /// only exists to support Microsoft's #pragma comment(linker,<br>
>>> > "/foo").<br>
>>> > virtual void HandleLinkerOptionPragma(llvm::StringRef Opts) {}<br>
>>> ><br>
>>> > + /// \brief Handle a pragma that emits a mismatch identifier and value<br>
>>> > to<br>
>>> > the<br>
>>> > + /// object file for the linker to work with. Currently, this only<br>
>>> > exists<br>
>>> > to<br>
>>> > + /// support Microsoft's #pragma detect_mismatch.<br>
>>> > + virtual void HandleDetectMismatch(llvm::StringRef Name,<br>
>>> > + llvm::StringRef Value) {}<br>
>>> > +<br>
>>> ><br>
>>> > Should we avoid broadening the ASTConsumer interface? If we lowered the<br>
>>> > option in Sema, then we could reuse HandleLinkerOptionPragma() without<br>
>>> > too<br>
>>> > much fuss. But then we're doing codegen-like work in Sema. I'd like a<br>
>>> > second opinion on this. If we can do this in Sema, we can eliminate a<br>
>>> > lot<br>
>>> > of the plumbing for this and for #pragma comment(lib).<br>
>>><br>
>>> I had originally done it that way, but wasn't overly keen on it. We<br>
>>> could reuse the TargetInfo behavior for getting the proper linker<br>
>>> options, but it seemed like a layering violation.<br>
>><br>
>><br>
>> Yeah, we'd have to use some Target interface outside of CodeGen, but I don't<br>
>> see anything obvious.<br>
>><br>
>> Perhaps we should continue full steam ahead on this route and refactor at a<br>
>> later date.<br>
><br>
> I don't think the current approach is particularly heinous, just<br>
> verbose. I'd be fine sticking with this route for now. But if<br>
> someone has a better idea as to how to structure this so we could get<br>
> more reusable machinery out of it, I'd be happy to attempt it as well.<br>
><br>
> ~Aaron<br>
</div></div></blockquote></div><br></div>