<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 29, 2014 at 3:03 PM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank" class="cremed">mail@justinbogner.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
>> + /// LLVM context for diagnostics. If this is nil, messages are emitted<br>
>> + /// to errs().<br>
>> + const Module *M;<br>
>> Again, why do we need the errs() behaviour? Also, AFAICT (and according<br>
>> to the comment) M is only used for M.getContext() - why not store the<br>
>> "const LLVMContext &" instead?<br>
><br>
> Yeah, using LLVMContext is a better alternative. My concern is<br>
> similar, however. Will I have an LLVMContext in llvm-profdata?<br>
<br>
</div></div>I think you can just getGlobalContext() in llvm-profdata and pass that<br>
in. Other tools do something similar.<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>Thanks. That's useful. Done.</div><div><br></div><div>Diego.</div></div></div></div>