<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Apr 27, 2014 at 11:20 PM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank">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="">On Sunday, April 27, 2014, Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2014 Apr 25, at 00:20, Justin Bogner <<a>mail@justinbogner.com</a>> wrote:<br>
<br>
> @@ -803,7 +803,7 @@ void CodeGenPGO::assignRegionCounters(co<br>
> llvm::IndexedInstrProfReader *PGOReader = CGM.getPGOReader();<br>
> if (!InstrumentRegions && !PGOReader)<br>
> return;<br>
> - if (!D)<br>
> + if (D->isImplicit())<br>
> return;<br>
<br>
If `D` is never `nullptr`, should it be passed by reference instead?<br>
</blockquote><div><br></div></div><div>Perhaps, but every caller of the function has a pointer in the first place. I'm not convinced it gains much to have all of the callers dereference those pointers - it's basically the same crash as now if they're null. I'm not opposed, but I don't think it's worth it without making a much larger change to clang's CodeGen interfaces.</div>
</blockquote></div><br></div><div class="gmail_extra">Agreed, most Decls are passed as 'const FooDecl *'. Let's use that consistently until there's consensus to change.</div></div>